r17059 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17058‎ | r17059 | r17060 >
Date:23:16, 16 October 2006
Author:yurik
Status:old
Tags:
Comment:
API * Enabled global profiling
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiBase.php
@@ -394,6 +394,7 @@
395395 if ($this->mTimeIn !== 0)
396396 ApiBase :: dieDebug(__METHOD__, 'called twice without calling profileOut()');
397397 $this->mTimeIn = microtime(true);
 398+ wfProfileIn($this->getModuleName());
398399 }
399400
400401 /**
@@ -407,6 +408,7 @@
408409
409410 $this->mModuleTime += microtime(true) - $this->mTimeIn;
410411 $this->mTimeIn = 0;
 412+ wfProfileOut($this->getModuleName());
411413 }
412414
413415 /**
@@ -432,6 +434,7 @@
433435 if ($this->mDBTimeIn !== 0)
434436 ApiBase :: dieDebug(__METHOD__, 'called twice without calling profileDBOut()');
435437 $this->mDBTimeIn = microtime(true);
 438+ wfProfileIn($this->getModuleName() . '_db');
436439 }
437440
438441 /**
@@ -448,6 +451,7 @@
449452
450453 $this->mDBTime += $time;
451454 $this->getMain()->mDBTime += $time;
 455+ wfProfileOut($this->getModuleName() . '_db');
452456 }
453457
454458 /**