首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

xdebug进展性能分析

2012-07-24 
xdebug进行性能分析PHP昨天网站出现了性能问题,使用了xdebug进行性能分析,效果不错。?xdebug会生产分析日志

xdebug进行性能分析

PHP昨天网站出现了性能问题,使用了xdebug进行性能分析,效果不错。

?

xdebug会生产分析日志,ubuntu下面可以用kcachegrind对日志进行分析。

?

安装:sudo apt-get install kcachegrind

?

windows下面类似的分析工具是:WinCacheGrind

?

xdebug的配置:

[xdebug]

?

zend_extension=/usr/lib/php5/xdebug.so

xdebug.profiler_enable=0

xdebug.auto_trace = 1

xdebug.profiler_enable_trigger = 1

xdebug.profiler_output_dir=/data/www/website/xdebug/

?

?

其中profiler_enable不要设置成1,不然所有的脚本运行都会写日志,profiler_enable_trigger =1 是在网址后面带XDEBUG_PROFILE参数,才会生成日志。(例:http://path/to/index.php?XDEBUG_PROFILE)

热点排行