RomânăEnglish
 
exteon.ro - Manual
3.3. XHProf

Starting with our PHP Profiler's version 2.0.0, you can use XHProf's excellent web visualization tool to browwse the profile output. We included the XHProf scripts for convenience in the xhprof folder. If you run the examples/recursion_example.php script, that will generate both the callgrind and xhprof files for the run. You can browse then to xhprof/xhprof_html/index.php and your run should be there ready for you (don't forget to set writing permissions for the examples folder, that's where the files will be output by the web3tracer PHP profiler):

 

web3tracer PHP profiler generated execution graph visualized with XHProf

 

Admittedly, the output is not as pretty as KCachegrind's, but it has the great advantage of being available over the web; and it does also posess a graphical visualisation tool, if you have installed the graphviz package:

 

web3tracer PHP profiler generated execution graph visualized graphically with XHProf

 

The bottom line is, you can still use the XHProf visualization tools now, while still profiting from the advantages of web3tracer (cycle detection, event better performance). Due to the modular writers design, you can use the PHP profiler to output for any tool you like, or even create your own.

 

Note for visualization tools developers:

 

If you have a tool that was integrated with XHProf and you need to integrate it with web3tracer, the lib/xhprofWriter.php file also contains the function web3tracer_xhprofConvert() which does on the fly conversion of our PHP profiler data to XHProf format without the need to write the files to disk. You can use it as a seamless adapter to connect your already made scripts.


(c) SC EXTEON SRL 2006-2009, All Rights Reserved
Powered by   Web3 CMS