Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/183466
Change subject: Switched API to using scopedProfileIn() ...................................................................... Switched API to using scopedProfileIn() Change-Id: Iaafad236c3e4c85e1b491e76f61322a266123ba6 --- M includes/api/ApiBase.php 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/66/183466/1 diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 87c88fb..3a31b2a 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -2181,6 +2181,10 @@ * Profiling: total module execution time */ private $mTimeIn = 0, $mModuleTime = 0; + /** @var ScopedCallback */ + private $profile; + /** @var ScopedCallback */ + private $dbProfile; /** * Get the name of the module as shown in the profiler log @@ -2205,7 +2209,7 @@ ApiBase::dieDebug( __METHOD__, 'Called twice without calling profileOut()' ); } $this->mTimeIn = microtime( true ); - wfProfileIn( $this->getModuleProfileName() ); + $this->profile = Profiler::instance()->scopedProfileIn( $this->getModuleProfileName() ); } /** @@ -2224,7 +2228,7 @@ $this->mModuleTime += microtime( true ) - $this->mTimeIn; $this->mTimeIn = 0; - wfProfileOut( $this->getModuleProfileName() ); + Profiler::instance()->scopedProfileOut( $this->profile ); } /** @@ -2271,7 +2275,8 @@ ApiBase::dieDebug( __METHOD__, 'Called twice without calling profileDBOut()' ); } $this->mDBTimeIn = microtime( true ); - wfProfileIn( $this->getModuleProfileName( true ) ); + + $this->dbProfile = Profiler::instance()->scopedProfileIn( $this->getModuleProfileName( true ) ); } /** @@ -2291,7 +2296,7 @@ $this->mDBTime += $time; $this->getMain()->mDBTime += $time; - wfProfileOut( $this->getModuleProfileName( true ) ); + Profiler::instance()->scopedProfileOut( $this->dbProfile ); } /** -- To view, visit https://gerrit.wikimedia.org/r/183466 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaafad236c3e4c85e1b491e76f61322a266123ba6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits