1. 程式人生 > >PHP效能分析,測試

PHP效能分析,測試

phpdbg

/usr/local/php5.6/bin/phpdbg
exec /www/index.php
b 22
[L24      0x7fd58508f1b8 ZEND_INCLUDE_OR_EVAL           C41                  <unused>             @0                   /www/index.php]
 00023:     require_once "./../include/config.inc.php";
>00024:     require_once "./../include/functions.inc.php";
 00025
: require_once "./../include/auto_load.php"; 00026:

strace

xdebug+kcachegrind


 1. 
pecl install xdebug
 2. 
php.ini
[Xdebug]
zend_extension=xdebug.so
xdebug.profiler_enable=on
xdebug.trace_output_dir="/tmp/xdebug"
xdebug.profiler_output_dir="/tmp/xdebug"
 3. 
 取出/tmp/xdebug/cachegrind...