XHProf

WBOY
WBOYOriginal
2016-06-06 19:34:431395browse

XHProf调用 无 //测试开始配置代码 xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); //测试的代码块开始 for ($i=1;$i=100;$i++) { echo $i.'br/'; } //测试的代码块结束 //结束代码块开始 $xhprof_data = xhprof_disable(); include_once ("/xhprof

XHProf  调用
//测试开始配置代码 
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); 
 
 
//测试的代码块开始 
for ($i=1;$i<=100;$i++) 
{ 
    echo $i.'<br/>'; 
} 
 
//测试的代码块结束 
 
//结束代码块开始 
$xhprof_data = xhprof_disable(); 
include_once ("/xhprof_lib/utils/xhprof_lib.php"); 
include_once ("/xhprof_lib/utils/xhprof_runs.php"); 
 
$objXhprofRun = new XHProfRuns_Default(); 
 
$run_id = $objXhprofRun->save_run($xhprof_data, "xhprof"); 
 
echo "<a href='/xhprof_html/index.php?run=".$run_id."&source=xhprof' target='_blank'>view</a>"; 
 
//结束代码块结尾 
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn