Home > php教程 > php手册 > XHProf

XHProf

WBOY
Release: 2016-06-06 19:34:43
Original
1394 people have browsed it

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>"; 
 
//结束代码块结尾 
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template