** 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
19 lines
408 B
Text
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
|
|
*/
|
|
|
|
|