* Move autoloader up a little bit so the profiler classes can use it * Make Profiler into a singleton so it's lazy-constructed, $wgProfiler is now a configuration array (used 'visible' in ProfilerSimpleText as an example of other globals we can move into this array). If $wgProfiler is set to an object, it'll use that for back-compat * Maintenance: rather than setting up the profiler and then disabling it, just disable it from the start * Kill $wgProfiling -> now that ProfilerStub overrides profileIn() and profileOut(), it's not needed * dumpHTML needs some fixes still
21 lines
500 B
Text
21 lines
500 B
Text
<?php
|
|
|
|
require_once( dirname(__FILE__).'/includes/ProfilerStub.php' );
|
|
|
|
/**
|
|
* To use a profiler, copy this file to StartProfiler.php,
|
|
* delete the PHP line above, 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
|
|
*/
|
|
|
|
|