php代码性能的分析方法 php代码的性能分析。
你可以用xdbug去分析。
但是更好的选择是facebook的性能分析工具xhprof。
它可以图形化。前提是你安装了gd库,你也可能遇到一些小问题。我记得要更新linux的图像库。
安装xhprof扩展:pecl install xhprof .
flags = (int)$config['flags']; } if (!empty($config['options'])) { $this->options = $config['options']; } } /** * 开启调试 */ public function enable() { xhprof_enable($this->flags, $this->options); } public function disable() { $this->xhprofdata = xhprof_disable(); } /** *显示调试结果 * 你可能需要配置一个apache/nginx虚拟主机 */ public function show() { $this->disable(); include_once xhprof_lib/utils/xhprof_lib.php; include_once xhprof_lib/utils/xhprof_runs.php; $xhprof_runs = new xhprofruns_default(); $run_id = $xhprof_runs->save_run($this->xhprofdata, xhprof_testing); echo see xhprof result; }}
http://www.bkjia.com/phpjc/850927.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/850927.htmltecharticlephp代码性能的分析方法 php代码的性能分析。 你可以用xdbug去分析。 但是更好的选择是facebook的性能分析工具xhprof。 它可以图形化。前提是...