* @todo document
* @package MediaWiki
*/
+require_once('Profiling.php');
+
class ProfilerSimple extends Profiler {
function ProfilerSimple() {
global $wgRequestTime,$wgRUstart;
if( !isset( $wgProfiling ) )
$wgProfiling = false;
-if ( $wgProfiling and (0 == rand() % $wgProfileSampleRate ) ) {
+if ( is_object($wgProfiler) ) {
+ /* nada, everything should be done already */
+} elseif ( $wgProfiling and (0 == rand() % $wgProfileSampleRate ) ) {
require_once( 'Profiling.php' );
+ $wgProfiling = true;
if ($wgProfilerType == "") {
$wgProfiler = new Profiler();
} else {