xhprof-0.9.2
+
+
Par Remi le jeudi 1 mars 2012, 19:09 - RPM - Lien permanent
RPM of xhprof extension, a hierarchical profiler is available in remi-test repository for Fedora ≥ 15 and EL ≥ 5.
Documentation: Hierarchical Profiler
Works with PHP 5.3.10 et 5.4.0.
There is 2 packages:
- xhprof : the web interface to browse the results
- php-pecl-xhprof : the PHP extension to collect the data
Installation:
yum --enablerepo=remi,remi-test install xhprof
To read the provided implementation documentation:
firefox file:/usr/share/doc/xhprof-0.9.2/docs/index.html
Web interface is installed on the local server : http://localhost/xhprof/
I'm waiting for your comments.
I will do some test, and perhaps, submit it for official repositories.
Commentaires
RPM are also available in remi repository for PHP 5.3.10.
Submitted for review : Review request #799597
Some time ago (yes, i know, more than 4 years), I wrote an article about Profiling PHP (in french) using xDebug.
This solution still works perfectly.
Advantages of xDebug:
Drawbacks:
So, I took some time to analyze some GLPI code using XHProf.
Finally, this tools is quite practical, with different features than xDebug.
Advantages of XHProf:
Drawbacks:
I quickly wrote a small XHProf class for GLPI, so, to analyze a part of code, we just need to add:
And we get, in the application log, the link to the analyse result, p.e.:
I took this opportunity to check the connection code (too long, for me, in large configuration) and quickly found a little optimization for the rules engine.
Then, I check the gettext performance impact, and conclude (we had 0,12" more to load each page) that we need to implement a memory cache for the locale file, after it have been parsed. Quick solution implemented for test (reducing the overload to 0,01").
So, I'm quite happy of this tool.