Remove Profiler specific code from fileOpPerfTest
authorErik Bernhardson <ebernhardson@wikimedia.org>
Fri, 1 Jul 2016 00:05:16 +0000 (17:05 -0700)
committerMaxSem <maxsem.wiki@gmail.com>
Fri, 1 Jul 2016 01:36:33 +0000 (01:36 +0000)
This code was referencing classes that no longer exist, so it was
removed. Profiling can still be accomplished the same way normal maint
scripts are profiled, by populating StartProfiler.php and passing
'--profiler ProfilerOutputText', or something similar, on the maint
script command line.

Change-Id: Ie037f6b224ec361c86b86369e2a4fff641908053

maintenance/fileOpPerfTest.php

index 92547ca..4b6c619 100644 (file)
@@ -42,8 +42,6 @@ class TestFileOpPerformance extends Maintenance {
        }
 
        public function execute() {
-               Profiler::setInstance( new ProfilerSimpleText( [] ) ); // clear
-
                $backend = FileBackendGroup::singleton()->get( $this->getOption( 'b1' ) );
                $this->doPerfTest( $backend );
 
@@ -51,9 +49,6 @@ class TestFileOpPerformance extends Maintenance {
                        $backend = FileBackendGroup::singleton()->get( $this->getOption( 'b2' ) );
                        $this->doPerfTest( $backend );
                }
-
-               Profiler::instance()->setTemplated( true );
-               // NOTE: as of MW1.21, $profiler->logData() is called implicitly by doMaintenance.php.
        }
 
        protected function doPerfTest( FileBackend $backend ) {