<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.luasandbox.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'luasandbox.enableprofiler.php',
    1 => 'LuaSandbox::enableProfiler',
    2 => 'Enable the profiler.',
  ),
  'up' => 
  array (
    0 => 'class.luasandbox.php',
    1 => 'LuaSandbox',
  ),
  'prev' => 
  array (
    0 => 'luasandbox.disableprofiler.php',
    1 => 'LuaSandbox::disableProfiler',
  ),
  'next' => 
  array (
    0 => 'luasandbox.getcpuusage.php',
    1 => 'LuaSandbox::getCPUUsage',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/luasandbox/luasandbox/enableprofiler.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="luasandbox.enableprofiler" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">LuaSandbox::enableProfiler</h1>
  <p class="verinfo">(PECL luasandbox &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">LuaSandbox::enableProfiler</span> &mdash; <span class="dc-title">Enable the profiler.</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-luasandbox.enableprofiler-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>LuaSandbox::enableProfiler</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$period</code><span class="initializer"> = 0.02</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Enables the profiler. Profiling will begin when Lua code is entered.
  </p>
  <p class="simpara">
   The profiler periodically samples the Lua environment to record the
   running function. Testing indicates that at least on Linux, setting a
   period less than 1ms will lead to a high overrun count but no
   performance problems.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-luasandbox.enableprofiler-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">period</code></dt>
    <dd>
     <span class="simpara">
      Sampling period in seconds.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-luasandbox.enableprofiler-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="simpara">
   Returns a boolean indicating whether the profiler is enabled.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-luasandbox.enableprofiler-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="luasandbox.disableprofiler.php" class="methodname" rel="rdfs-seeAlso">LuaSandbox::disableProfiler()</a> - Disable the profiler</span></li>
   <li><span class="methodname"><a href="luasandbox.getprofilerfunctionreport.php" class="methodname" rel="rdfs-seeAlso">LuaSandbox::getProfilerFunctionReport()</a> - Fetch profiler data</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>