[PHP] 使用xdebug查看php的性能損耗
- 2020 年 3 月 26 日
- 筆記
xdebug除了調試程序外 , 還可以來檢測程序的性能損耗點 , 展示成圖表的形式
在php.ini中增加如下配置:
xdebug.profiler_output_dir=/tmp xdebug.profiler_enable=1
訪問程序後 , 會在tmp目錄生成cachegrind.out.xxxx的文件 , 把這個文件下載到我們windows系統上
下載個qcachegrind軟件直接打開上面的cache文件,可以看到性能損耗和調用關係
https://sourceforge.net/projects/qcachegrindwin/
