1.下载地址:https://pecl.php.net/package/xhprof
2.参考:https://www.cnblogs.com/iverson-3/p/17214770.html
3.修改xhprof_foo文件位置:php.ini中修改
4:引入utils文件夹下文件
4.TP6使用demo
xhprof_enable();
// echo 11;
$xhprof_data = xhprof_disable();
// print_r($xhprof_data);die;
$XHPROF_ROOT = realpath(dirname(__FILE__) .'/..');
include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_lib.php";
include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_runs.php";
$xhprof_runs = new XHProfRuns_Default();
// save the run under a namespace "xhprof_foo"
$run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_foo");