codecamp

PHP8 xhprof_sample_enable — 以采样模式启动 XHProf 性能分析

(PECL xhprof >= 0.9.0)

xhprof_sample_enable — 以采样模式启动 XHProf 性能分析

说明

xhprof_sample_enable(): void

xhprof_enable() 的更轻量的版本,以采样模式开始性能分析。 抽样的间隔为 0.1 秒,样本记录了完整的函数调用堆栈。 主要使用的情况是以较低的性能开销来进行性能监控和诊断。

参数

此函数没有参数。

返回值

null

参见

  • xhprof_sample_disable() - 停止 xhprof 性能采样分析器
  • xhprof_enable() - 启动 xhprof 性能分析器
  • memory_get_usage() - 返回分配给 PHP 的内存量
  • getrusage() - 获取当前资源使用状况


PHP8 xhprof_sample_disable — 停止 xhprof 性能采样分析器
PHP8 简介
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定