Note: You are currently viewing documentation for Moodle 3.8. Up-to-date documentation for the latest stable version of Moodle may be available here: Profiling PHP.

Development:Profiling PHP: Difference between revisions

From MoodleDocs
Line 8: Line 8:


* [http://moodle.org/mod/forum/discuss.php?d=162045 Forum thread about profiling Moodle 2.0]
* [http://moodle.org/mod/forum/discuss.php?d=162045 Forum thread about profiling Moodle 2.0]
Xdebug articles:
* [http://www.xdebug.org/docs/profiler Profiling PHP Scripts] in Xdebug documentation
* [http://devzone.zend.com/article/2803-Introducing-xdebug Introducing xdebug]
XHProf articles:
XHProf articles:
* [https://docs.google.com/present/view?id=dcbkgbgf_45fbg3rnmk& Presentation about XHProf]
* [https://docs.google.com/present/view?id=dcbkgbgf_45fbg3rnmk& Presentation about XHProf]
* [http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/ Profiling with XHProf]
* [http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/ Profiling with XHProf]
* [http://www.open.ac.uk/blogs/XHProf/?page_id=46 XHProf – Profiling and Reporting] from Moodle perspective written by [http://moodle.org/user/view.php?id=264538&course=5 James Brisland]
* [http://www.open.ac.uk/blogs/XHProf/?page_id=46 XHProf – Profiling and Reporting] from Moodle perspective written by [http://moodle.org/user/view.php?id=264538&course=5 James Brisland]
Xdebug articles:
* [http://devzone.zend.com/article/2803-Introducing-xdebug Introducing xdebug]


{{CategoryDeveloper}}
{{CategoryDeveloper}}

Revision as of 10:41, 12 November 2010

PHP has two significant profilers...

One is XDebug - this is well known and understood and it's trace output is supported by tools like KCachegrind.

The other is xhprof, a profiler released by facebook's engineering team, designed for capturing profile traces on live servers. Compared to XDebug, xhprof aims to have the minimum impact on execution times and require relatively little space to store a trace, so you can run it live without a noticeable impact on users and without filling disks. The trade off with xhprof is in slightly less detail and a trace format that needs it's own GUI to visualize (which ships with xhprof). The reason you'd want to profile in a live environments (vs. on development) is certain categories of problem may only been seen live, e.g. (data related) what happens when the user table grows 100 times, the impact on "login.php" or (service related) server to server HTTP requests. Did a presentation once XHProf - facebooks PHP profiler which explains in more detail - Penny saw the talk which is how I ended up writing this.

See also

XHProf articles:

Xdebug articles:

Template:CategoryDeveloper