Manual:Profiling/Xhprof

Starting with MediaWiki 1.25, you can use xhprof to profile code. You can install the pecl package or see if your distribution has a package for xhprof. HHVM has xhprof built in.

TODO Document:
 * How to control which functions are profiled/ignored
 * Scoped sub-section profiling
 * Links to upstream bugs

Installing
HHVM has xhprof built-in. For PHP5 (Zend) users:


 * Use the php5-xhprof package provided by your system's package manager
 * Download the source from pecl and build manually

Configuration
An example StartProfiler.php file:

The code unconditionally calls, and will fatal if xhprof is not installed.