posts - 88, comments - 3, trackbacks - 0, articles - 0
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

Profilling PHP by xdebug

Posted on 2012-02-17 12:58 Milo的海域 阅读(237) 评论(0)  编辑  收藏 所属分类: PHP
install xdebug
yum install php-pear
pecl install xdebug
find / -name 'xdebug.so'

config php.ini for xdebug extension
; load as zend ext
zend_extension=/usr/lib64/php/modules/xdebug.so
; make sure profiler_enable disable
xdebug.profiler_enable=off
; enable trigger
xdebug.profiler_enable_trigger=on
; make sure web server has write privilege on output dir
xdebug.profiler_output_dir=/tmp

restart httpd
send http request
curl 'http://10.1.74.51/admin/php/adapter.php?action=getSystemChartsData&XDEBUG_PROFILE'

get and analyze output log by kcachegrind






只有注册用户登录后才能发表评论。


网站导航: