Set up the profiler in CLI mode.
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 17 Apr 2013 01:20:00 +0000 (18:20 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 17 Apr 2013 17:05:00 +0000 (10:05 -0700)
Change-Id: I7f36786573870b66b4f1e93c2fc2e444f1ae1252

maintenance/doMaintenance.php

index 15b0016..210c5a2 100644 (file)
@@ -60,10 +60,15 @@ if ( isset( $_SERVER['MW_COMPILED'] ) ) {
        # Get the MWInit class
        require_once( "$IP/includes/Init.php" );
        require_once( "$IP/includes/AutoLoader.php" );
+       # Stub the profiler
+       require_once( "$IP/includes/profiler/Profiler.php" );
 }
 
-# Stub the profiler
-require_once( MWInit::compiledPath( 'includes/profiler/Profiler.php' ) );
+# Start the profiler
+$wgProfiler = array();
+if ( file_exists( "$IP/StartProfiler.php" ) ) {
+       require( "$IP/StartProfiler.php" );
+}
 
 // Some other requires
 if ( !defined( 'MW_COMPILED' ) ) {