xdebug除了除錯程式外 , 還可以來檢測程式的性能損耗點 , 展示成圖表的形式
在php.ini中增加如下配置:
xdebug.profiler_output_dir=/tmp
xdebug.profiler_enable=1
訪問程式后 , 會在tmp目錄生成cachegrind.out.xxxx的檔案 , 把這個檔案下載到我們windows系統上
下載個qcachegrind軟體直接打開上面的cache檔案,可以看到性能損耗和呼叫關系
https://sourceforge.net/projects/qcachegrindwin/

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/71697.html
標籤:PHP
