From: Yuri Astrakhan Date: Mon, 16 Oct 2006 23:16:12 +0000 (+0000) Subject: API * Enabled global profiling X-Git-Tag: 1.31.0-rc.0~55459 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=519252da6e96ef2df75d67501967cb1113ab0558;p=lhc%2Fweb%2Fwiklou.git API * Enabled global profiling --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 3853e18a23..466e25e5b6 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -394,6 +394,7 @@ abstract class ApiBase { if ($this->mTimeIn !== 0) ApiBase :: dieDebug(__METHOD__, 'called twice without calling profileOut()'); $this->mTimeIn = microtime(true); + wfProfileIn($this->getModuleName()); } /** @@ -407,6 +408,7 @@ abstract class ApiBase { $this->mModuleTime += microtime(true) - $this->mTimeIn; $this->mTimeIn = 0; + wfProfileOut($this->getModuleName()); } /** @@ -432,6 +434,7 @@ abstract class ApiBase { if ($this->mDBTimeIn !== 0) ApiBase :: dieDebug(__METHOD__, 'called twice without calling profileDBOut()'); $this->mDBTimeIn = microtime(true); + wfProfileIn($this->getModuleName() . '_db'); } /** @@ -448,6 +451,7 @@ abstract class ApiBase { $this->mDBTime += $time; $this->getMain()->mDBTime += $time; + wfProfileOut($this->getModuleName() . '_db'); } /**