好用的php执行时间分析工具webgrind

以前分析xdebug用的是(wincachegrind)http://sourceforge.net/projects/wincachegrind/

现在直接安装webgrind来调试速度会更好

http://xdebug.org/

 

 

windows

编辑php.ini,先注释掉zend:
[Zend]
;zend_extension_ts = “D:\Xampp\php\zendOptimizer\lib\ZendExtensionManager.dll”
启用x-debug
[xdebug]
zend_extension_ts = “D:\Xampp\php\ext\php_xdebug-2.0.0-5.2.2.dll”;必须为完整路径
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir=”D:\Xampp\tmp\xdebug”
linux

安装xdebug扩展
sudo pecl install xdebug

 

源码安装按下载包里的README文件。


编辑php.ini,启用x-debug
[xdebug]
zend_extension_ts = “/usr/lib/php5/xdebug.so” ;必须为完整路径
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir=”/tmp”
webgrind
http://code.google.com/p/webgrind/

下载地址:http://webgrind.googlecode.com/files/webgrind-release-0.81.zip

下载webgrind,解压缩到web目录
首先访问需要优化的php程序,get/post请求中加入XDEBUG_PROFILE
例如info.php,http://localhost/info.php?XDEBUG_PROFILE
然后访问:http://localhost/webgrind/
默认auto,即为刚刚请求的文件profile,[update]!
程序不兼容IE(本机测试winxp+ie6),如果点了update之后毫无反应,请使用firefox。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值