r36469 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36468‎ | r36469 | r36470 >
Date:16:33, 19 June 2008
Author:minuteelectron
Status:old
Tags:
Comment:
* Add some basic profiling.
Modified paths:
  • /trunk/extensions/Babel/BabelStatic.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Babel/BabelStatic.class.php
@@ -15,6 +15,8 @@
1616 */
1717 public static function Setup() {
1818
 19+ wfProfileIn( __METHOD__ );
 20+
1921 /* Register the hook within the parser object.
2022 */
2123 global $wgParser;
@@ -25,6 +27,8 @@
2628 */
2729 return true;
2830
 31+ wfProfileOut( __METHOD__ );
 32+
2933 }
3034
3135 /**
@@ -37,6 +41,8 @@
3842 */
3943 public static function Magic( array $magicWords, $langCode ) {
4044
 45+ wfProfileIn( __METHOD__ );
 46+
4147 /* Register the magic word, maybe one day this could be localised by adding
4248 * synonyms into the array -- but there is currently no simple way of doing
4349 * that given the current way of localisation. The first element is set to
@@ -49,6 +55,8 @@
5056 */
5157 return true;
5258
 59+ wfProfileOut( __METHOD__ );
 60+
5361 }
5462
5563 /**
@@ -59,6 +67,8 @@
6068 */
6169 public static function Render( $parser ) {
6270
 71+ wfProfileIn( __METHOD__ );
 72+
6373 /* Get the location of the language codes file.
6474 */
6575 global $wgLanguageCodesFiles;
@@ -83,6 +93,8 @@
8494 */
8595 return call_user_func_array( array( $wgBabel, 'render' ), $args );
8696
 97+ wfProfileOut( __METHOD__ );
 98+
8799 }
88100
89101 }
\ No newline at end of file

Status & tagging log