<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.xhprof.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.xhprof-sample-enable.php',
    1 => 'xhprof_sample_enable',
    2 => '以采样模式启动 XHProf 性能分析',
  ),
  'up' => 
  array (
    0 => 'ref.xhprof.php',
    1 => 'Xhprof 函数',
  ),
  'prev' => 
  array (
    0 => 'function.xhprof-sample-disable.php',
    1 => 'xhprof_sample_disable',
  ),
  'next' => 
  array (
    0 => 'book.yac.php',
    1 => 'Yac',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/xhprof/functions/xhprof-sample-enable.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.xhprof-sample-enable" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xhprof_sample_enable</h1>
  <p class="verinfo">(PECL xhprof &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">xhprof_sample_enable</span> &mdash; <span class="dc-title">以采样模式启动 XHProf 性能分析</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.xhprof-sample-enable-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>xhprof_sample_enable</strong></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><a href="function.xhprof-enable.php" class="function">xhprof_enable()</a></span> 的更轻量的版本，以采样模式开始性能分析。
   抽样的间隔为 0.1 秒，样本记录了完整的函数调用堆栈。
   主要使用的情况是以较低的性能开销来进行性能监控和诊断。
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.xhprof-sample-enable-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.xhprof-sample-enable-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.xhprof-sample-enable-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.xhprof-sample-disable.php" class="function" rel="rdfs-seeAlso">xhprof_sample_disable()</a> - 停止 xhprof 性能采样分析器</span></li>
   <li><span class="function"><a href="function.xhprof-enable.php" class="function" rel="rdfs-seeAlso">xhprof_enable()</a> - 启动 xhprof 性能分析器</span></li>
   <li><span class="function"><a href="function.memory-get-usage.php" class="function" rel="rdfs-seeAlso">memory_get_usage()</a> - 返回分配给 PHP 的内存量</span></li>
   <li><span class="function"><a href="function.getrusage.php" class="function" rel="rdfs-seeAlso">getrusage()</a> - 获取当前资源使用状况</span></li>
  </ul>
 </div>

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