From 519252da6e96ef2df75d67501967cb1113ab0558 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Mon, 16 Oct 2006 23:16:12 +0000 Subject: [PATCH] API * Enabled global profiling --- includes/api/ApiBase.php | 4 ++++ 1 file changed, 4 insertions(+) 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'); } /** -- 2.20.1