r86231 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86230‎ | r86231 | r86232 >
Date:19:23, 16 April 2011
Author:demon
Status:ok
Tags:
Comment:
Followup r86228 (profiling cleanup):
* Move autoloader up in Maintenance as well
* Add setInstance() method to Profiler, dumpHTML will need it
Modified paths:
  • /trunk/phase3/includes/profiler/Profiler.php (modified) (history)
  • /trunk/phase3/maintenance/doMaintenance.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/doMaintenance.php
@@ -67,6 +67,7 @@
6868 # Get the MWInit class
6969 if ( !defined( 'MW_COMPILED' ) ) {
7070 require_once( "$IP/includes/Init.php" );
 71+ require_once( "$IP/includes/AutoLoader.php" );
7172 }
7273
7374 # Stub the profiler
@@ -74,7 +75,6 @@
7576
7677 // Some other requires
7778 if ( !defined( 'MW_COMPILED' ) ) {
78 - require_once( "$IP/includes/AutoLoader.php" );
7979 require_once( "$IP/includes/Defines.php" );
8080 }
8181 require_once( "$IP/includes/DefaultSettings.php" );
Index: trunk/phase3/includes/profiler/Profiler.php
@@ -95,6 +95,14 @@
9696 }
9797
9898 /**
 99+ * Set the profiler to a specific profiler instance. Mostly for dumpHTML
 100+ * @param $p Profiler object
 101+ */
 102+ public static function setInstance( Profiler $p ) {
 103+ self::$__instance = $p;
 104+ }
 105+
 106+ /**
99107 * Called by wfProfieIn()
100108 *
101109 * @param $functionname String

Follow-up revisions

RevisionCommit summaryAuthorDate
r86233Various profiler fixes for dumpHTML (needs r86175, r86228, r86231, r86232)demon19:34, 16 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86175First step of reorganizing profiling files:...demon02:19, 16 April 2011
r86228More profiler cleanup:...demon19:00, 16 April 2011

Status & tagging log