wiki.techinc.nl/StartProfiler.sample
Tim Starling a0123d0549 * Made the profiler work in HipHop:
** Don't try to set a global variable in the same file as a class definition (Profiler.php). Set it in WebStart.php instead.
** In StartProfiler.sample, don't use require_once() to get ProfilerStub.

* Removed the setproctitle() stuff from ProfilerStub, the extension is not maintained and doesn't work with Apache 2.x
* Added an optimisation to wfProfileIn() and wfProfileOut() to reduce the overhead when profiling is not enabled
* Added the ability to configure in StartProfiler.php whether CPU time or wall-clock time is used, avoiding recompilation
2011-05-31 06:05:05 +00:00

19 lines
408 B
Text

<?php
/**
* To use a profiler, copy this file to StartProfiler.php,
* and add something like this:
*
* $wgProfiler['class'] = 'Profiler';
*
* Or for a sampling profiler:
* if ( !mt_rand( 0, 100 ) ) {
* $wgProfiler['class'] = 'Profiler';
* } else {
* $wgProfiler['class'] = 'ProfilerStub';
* }
*
* Configuration of the profiler output can be done in LocalSettings.php
*/