php xdebug性能分析,phpstorm查看性能分析報告,使用mac的qcachegrind工具來進行圖形化查看

xdebug 性能分析:

性能分析:

php.ini 中配置

xdebug.profiler_enable=0

xdebug.profiler_enable_trigger=1

xdebug.profiler_output_name=cachegrind.out.%t.%p

xdebug.profiler_output_dir=/mnt/hgfs/work_www/360che/xdebug/

說明:profiler_enable  值爲1代表每次請求都生成報告文件;

           profiler_enable_trigger  值爲1 代表 ,有特定的get參數[ XDEBUG_PROFILE ]才生成報告文件

 

mac 安裝acachegrind 

1)brew install graphviz

2)brew install qcachegrind

####brew install qcachegrind --with-graphviz

在phpstorm 中 Tools 中點擊 “Analyze  Xdebug ..." 選擇生成的報告文件 打開

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章