<dtml-var manage_page_header>
<dtml-var manage_tabs>

<dtml-let sort="REQUEST.get('sort', 'time')"
          limit="REQUEST.get('limit', 100)" 
          mode="REQUEST.get('mode', 'stats')" 
          stripDirs="REQUEST.get('stripDirs', 1)" 
          stats="manage_profile_stats(sort, limit, stripDirs, mode)">
<dtml-if stats>
<p class="form-help">
Profiling information is generated using the standard Python 
profiler. To learn how to interpret the profiler statistics, 
see the <a href="http://www.python.org/doc/current/lib/module-profile.html">
Python profiler documentation</a>.
</p>
<br />
<form action="&dtml-URL;" method="POST">
<table>
<tr>
<td><strong>Sort</strong>: 
    <select name="sort">
    <dtml-in "('time', 'cumulative', 'calls', 'pcalls',
              'name', 'file', 'module', 'line',
              'nfl', 'stdname')">
    <option value="&dtml-sequence-item;"<dtml-if 
     "sort==_['sequence-item']"> selected</dtml-if>>&dtml-sequence-item;
    </dtml-in>
    </select>
</td>
<td><strong>Limit</strong>: 
    <select name="limit:int">
    <dtml-in "(100, 200, 300, 400, 500)">
    <option value="&dtml-sequence-item;"<dtml-if 
     "limit==_['sequence-item']"> selected</dtml-if>>&dtml-sequence-item;
    </dtml-in>
    </select>
</td>
<td><strong>strip Dirs</strong>: 
    <input type=hidden name="stripDirs:int:default" value="0">
    <input type=checkbox name="stripDirs:int" value="1" <dtml-if stripDirs>checked</dtml-if>>
</td>
<td><strong>Mode</strong>: 
    <select name="mode">
    <dtml-in "('stats', 'callees', 'callers',)">
    <option value="<dtml-var sequence-item>"<dtml-if 
     "mode==_['sequence-item']"> selected</dtml-if>><dtml-var 
    sequence-item>
    </dtml-in>
    </select>
</td>
<td>
<input type="submit" name="submit" value="Update">
</td>
</tr>
</table>
</form>
<hr>
<pre>
&dtml-stats;
</pre>

<dtml-else>
<br />
<div class="form-text">
Profiling is not currently enabled or there is not yet any profiling
data to report.  To enable profiling, restart the Zope process with
the configuration setting 'publisher-profile-file' defined. The value
of this variable should be the full system path to a file that will be
used to dump a profile report when the process restarts or exits.
</div>
</dtml-if>
</dtml-let>

<dtml-var manage_page_footer>
