cd xhprof/extension/ phpize ./configure makemake install
und fügen Sie dann
extension=xhprof.so
entsprechend der Situation zu /etc/php.ini hinzu und führen Sie <🎜 aus >
php -m | grep xhprof
Array ( [main()] => Array ( [ct] => 1 [wt] => 9 )) ---------------Assuming you have set up the http based UI for XHProf at some address, you can view run at http://<xhprof-ui-address>/index.php?run=592567308784c&source=xhprof_foo ---------------
xhprof_html/index.php?run=592567308784c&source=xhprof_foo
failed to execute cmd:" dot -Tpng". stderr:sh: dot:command not found。
//解决方案yum install graphviz
// start profiling xhprof_enable();
// stop profiler $xhprof_data = xhprof_disable(); // display raw xhprof data for the profiler run print_r($xhprof_data); include_once "xhprof_lib.php"; include_once "xhprof_runs.php"; // save raw data for this profiler run using default // implementation of iXHProfRuns. $xhprof_runs = new XHProfRuns_Default(); // save the run under a namespace "xhprof_foo" $run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_foo"); echo "---------------\n". "Assuming you have set up the http based UI for \n". "XHProf at some address, you can view run at \n". "http://<xhprof-ui-address>/index.php?run=$run_id&source=xhprof_foo\n". "---------------\n";
http://***/xhprof_html/index.php?run=*****&source=xhprof_foo
Das obige ist der detaillierte Inhalt vonGrafisches Code-Tutorial zur Installation und Verwendung des xhprof-Leistungsanalysetools unter PHP7. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!