Log profiling info from maintenance scripts.
authordaniel <daniel.kinzler@wikimedia.de>
Thu, 31 Jan 2013 14:36:29 +0000 (15:36 +0100)
committerdaniel <daniel.kinzler@wikimedia.de>
Fri, 1 Feb 2013 10:23:21 +0000 (11:23 +0100)
Previously, maintenance scripts did not log profiling info.

Change-Id: Ib63dd54b815cca774cd764f28505f9dbdfd02cfc

maintenance/doMaintenance.php
maintenance/fileOpPerfTest.php

index 2bb2a0f..c6768bd 100644 (file)
@@ -111,6 +111,9 @@ try {
 
        // Potentially debug globals
        $maintenance->globals();
+
+       // log profiling info
+       wfLogProfilingData();
 } catch ( MWException $mwe ) {
        echo( $mwe->getText() );
        exit( 1 );
index d98cfe3..4cb5e10 100644 (file)
@@ -55,7 +55,8 @@ class TestFileOpPerformance extends Maintenance {
 
                $profiler = Profiler::instance();
                $profiler->setTemplated( true );
-               $profiler->logData(); // prints
+
+               //NOTE: as of MW1.21, $profiler->logData() is called implicitly by doMaintenance.php.
        }
 
        protected function doPerfTest( FileBackend $backend ) {