Sha256: 1a9640f1418c76e6345b6e15da530d505012bda4555fcc9b26237e480a64a98e

Contents?: true

Size: 830 Bytes

Versions: 6

Compression:

Stored size: 830 Bytes

Contents

<%
  if _get["choice"] == "dogarbagecollect"
    _hb.clean
    GC.start
    
    #Clean all Knj::Objects used in the application.
    ObjectSpace.each_object(Knj::Objects) do |objects|
      objects.clean_all
    end
    
    Knj::Web.redirect("?show=debug_memory_usage")
  end
%>

<h1>Memory usage</h1>

<div style="padding-bottom: 15px;">
  <input type="button" value="Garbage collect" onclick="location.href='?show=debug_memory_usage&amp;choice=dogarbagecollect';" />
</div>

<h1>Hayabusa sessions</h1>
<table style="width: 600px;">
  <tbody>
    <tr>
      <td>Active sessions</td>
      <td><%=_hb.num(_hb.sessions.length, 0)%></td>
    </tr>
    <tr>
      <td>Total sessions</td>
      <td><%=_hb.num(_hb.ob.list(:Session, "count" => true), 0)%>
    </tr>
  </tbody>
</table>

<br />

<%
  Knj::Memory_analyzer.new.write
%>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hayabusa-0.0.30 pages/debug_memory_usage.rhtml
hayabusa-0.0.28 pages/debug_memory_usage.rhtml
hayabusa-0.0.25 pages/debug_memory_usage.rhtml
hayabusa-0.0.24 pages/debug_memory_usage.rhtml
hayabusa-0.0.23 pages/debug_memory_usage.rhtml
hayabusa-0.0.22 pages/debug_memory_usage.rhtml