MediaWiki  1.23.2
Profiler.php File Reference

Base class and functions for profiling. More...

Go to the source code of this file.

Classes

class  Profiler
 
class  ProfileSection
 Class for handling function-scope profiling. More...
 

Functions

 wfProfileIn ( $functionname)
 Begin profiling of a function. More...
 
 wfProfileOut ( $functionname='missing')
 Stop profiling of a function. More...
 

Detailed Description

Base class and functions for profiling.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

This file is only included if profiling is enabled

Definition in file Profiler.php.

Function Documentation

◆ wfProfileIn()

wfProfileIn (   $functionname)

Begin profiling of a function.

Parameters
string$functionnamename of the function we will profile
Examples
/src/tests/phpunit/MediaWikiTestCase.php.

Definition at line 33 of file Profiler.php.

References Profiler\$__instance, and Profiler\instance().

Referenced by AjaxDispatcher\__construct(), ResourceLoader\__construct(), MappedDiff\__construct(), WordLevelDiff\__construct(), StubObject\_unstub(), JobQueue\ack(), EmailNotification\actuallyNotifyOnPageChange(), LinkCache\addLinkObj(), WatchedItem\addWatch(), OutputPage\addWikiTextTitle(), JobQueue\batchPush(), DiffFormatter\block(), SkinTemplate\buildContentActionUrls(), SkinTemplate\buildContentNavigationUrls(), ChangesFeed\buildItems(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), Skin\buildSidebar(), Profiler\calculateOverhead(), TableDiffFormatter\changed(), MediaWiki\checkMaxLag(), UploadBase\checkWarnings(), Block\chooseBlock(), SiteSQLStore\clear(), WordLevelDiff\closing(), ViewCountUpdate\collect(), LanguageKk\convertGrammar(), JobQueue\deduplicateRootJob(), JobQueue\delete(), Block\deleteIfExpired(), UploadBase\detectScript(), UploadBase\detectVirus(), DiffEngine\diff(), DiffEngine\diffLocal(), WikiExporter\do_list_authors(), WikiPage\doEditContent(), WikiPage\doEditUpdates(), LinksUpdate\doIncrementalUpdate(), Language\doMagicHook(), UserCache\doQuery(), LinkBatch\doQuery(), IndexPager\doQuery(), WikiPage\doQuickEditContent(), DjVuHandler\doTransform(), HTMLCacheUpdate\doUpdate(), DeferredUpdates\doUpdates(), WikiExporter\dumpFrom(), Xml\elementClean(), MWTidy\execExternalTidy(), MWTidy\execInternalTidy(), RunJobs\execute(), MWHttpRequest\execute(), CurlHttpRequest\execute(), PhpHttpRequest\execute(), LocalFileDeleteBatch\execute(), LinkBatch\executeInto(), SpecialRunJobs\executeJobs(), SpecialPageFactory\executePath(), PPFrame_DOM\expand(), TempFSFile\factory(), Article\fetchContent(), Article\fetchContentObject(), FormatMetadata\fetchExtendedMetadata(), ResourceLoader\filter(), HtmlFormatter\filterContent(), HtmlFormatter\fixLibXML(), JobQueue\flushCaches(), DiffFormatter\format(), Linker\formatComment(), FeedUtils\formatDiffRow(), Linker\formatHiddenCategories(), SpecialProtectedtitles\formatRow(), DeletedContribsPager\formatRow(), ContribsPager\formatRow(), Linker\formatTemplates(), CoreParserFunctions\gender(), ChangesFeed\generateFeed(), DifferenceEngine\generateTextDiffBody(), MessageBlobStore\get(), MemcachedPeclBagOStuff\get(), ParserCache\get(), MWMemcached\get(), JobQueue\getAbandonedCount(), JobQueue\getAcquiredCount(), AllmessagesTablePager\getAllMessages(), JobQueueAggregator\getAllReadyWikiQueues(), User\getAutomaticGroups(), User\getBlockedStatus(), Block\getBlocksForIPList(), Skin\getCachedNotice(), SiteSQLStore\getCacheKey(), Title\getCascadeProtectionSources(), Language\getCaseMaps(), LoadBalancer\getConnection(), SwiftFileBackend\getContainerStat(), Article\getContentObject(), CreditsAction\getCredits(), AllmessagesTablePager\getCustomisedStatuses(), ResourceLoaderModule\getDefinitionMtime(), JobQueue\getDelayedCount(), DifferenceEngine\getDiffBody(), User\getEditCount(), User\getEffectiveGroups(), FormatMetadata\getExtendedMetadataFromFile(), FormatMetadata\getExtendedMetadataFromHook(), FileBackendStore\getFileSha1Base36(), FileBackendStore\getFileStat(), FileBackendStore\getFileXAttributes(), CategoryViewer\getHTML(), LocalisationCache\getItem(), WikiPage\getLastNAuthors(), Title\getLinkURL(), SpecialPageFactory\getList(), Category\getMembers(), DjVuHandler\getMetaTree(), ResourceLoaderFileModule\getModifiedTime(), ResourceLoaderStartUpModule\getModuleRegistrations(), MemcachedPeclBagOStuff\getMulti(), Skin\getNamespaceNotice(), WikiPage\getOldestRevision(), Title\getPageLanguage(), Revision\getParentLengths(), WikiPage\getParserOutput(), FSFile\getProps(), UploadBase\getRealPath(), Revision\getRevisionText(), FSFile\getSha1Base36(), SiteSQLStore\getSite(), Skin\getSiteNotice(), SiteSQLStore\getSites(), JobQueue\getSize(), RequestContext\getSkin(), Skin\getSkinNames(), ProtectedTitlesPager\getStartBody(), LogPager\getStartBody(), MergeHistoryPager\getStartBody(), LocalisationCache\getSubitem(), HtmlFormatter\getText(), ApiTokens\getTokenTypes(), BaseTemplate\getToolbox(), Title\getUserPermissionsErrorsInternal(), SpecialVersion\getVersion(), SpecialVersion\getVersionLinked(), SearchHighlighter\highlightSimple(), SearchHighlighter\highlightText(), SquidUpdate\HTCPPurge(), User\inDnsBlacklist(), ParserOptions\initialiseFromUser(), Category\initialize(), MediaWiki\initializeArticle(), Skin\initPage(), WikiPage\insertOn(), Revision\insertOn(), User\isBlockedFrom(), JobQueue\isEmpty(), User\isLocallyBlockedProxy(), JobQueue\isRootJobOldDuplicate(), Linker\link(), Linker\linkAttribs(), Linker\linkUrl(), MessageCache\load(), User\load(), MagicWord\load(), User\loadDefaults(), OldLocalFile\loadExtraFromDB(), LocalFile\loadExtraFromDB(), LocalFile\loadFromCache(), OldLocalFile\loadFromDB(), LocalFile\loadFromDB(), MessageCache\loadFromDB(), SiteSQLStore\loadSites(), Revision\loadText(), LockManager\lockByType(), MediaWiki\main(), Linker\makeBrokenImageLinkObj(), LinkHolderArray\makeHolder(), Linker\makeKnownLinkObj(), Linker\makeLinkObj(), ResourceLoader\makeModuleResponse(), ApiParse\makeParserOptions(), DatabaseMysqlBase\masterPosWait(), SquidUpdate\newFromLinksTo(), Revision\newNullRevision(), LanguageBe_tarask\normalizeForSearch(), LanguageYue\normalizeForSearch(), LanguageZh_hans\normalizeForSearch(), LanguageZh\normalizeForSearch(), Linker\normalizeSubpageLink(), SearchMySQL\normalizeText(), JobQueueAggregator\notifyQueueEmpty(), JobQueueAggregator\notifyQueueNonEmpty(), WatchAction\onSubmit(), UnwatchAction\onSubmit(), CreditsAction\onView(), HistoryAction\onView(), DatabaseMysqlBase\open(), LoadBalancer\openConnection(), LoadBalancer\openForeignConnection(), WordLevelDiff\orig(), OutputPage\output(), SkinTemplate\outputPage(), InfoAction\pageCounts(), SiteStats\pagesInNs(), MessageCache\parse(), MWHttpRequest\parseCookies(), MWHttpRequest\parseHeader(), HtmlFormatter\parseItemsToRemove(), AjaxDispatcher\performAction(), MediaWiki\performAction(), MediaWiki\performRequest(), UploadBase\performUpload(), User\pingLimiter(), JobQueue\pop(), SkinTemplate\prepareQuickTemplate(), BlockListPager\preprocessResults(), Preprocessor_Hash\preprocessToObj(), Preprocessor_DOM\preprocessToObj(), Preprocessor_DOM\preprocessToXml(), JobQueueAggregator\purge(), SquidUpdate\purge(), LocalFile\purgeCache(), LocalFile\purgeOldThumbnails(), LocalFile\purgeThumbnails(), DatabaseBase\query(), BacklinkCache\queryLinks(), LinksUpdate\queueRecursiveJobsForTable(), SvgHandler\rasterize(), LocalisationCache\readJSONFile(), LocalisationCache\readPHPFile(), LocalisationCache\readSourceFilesAndRegisterDeps(), MWCryptRand\realGenerate(), LocalisationCache\recache(), EnhancedChangesList\recentChangesBlock(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), OldChangesList\recentChangesLine(), EnhancedChangesList\recentChangesLine(), LocalFile\recordUpload2(), Category\refreshCounts(), ResourceLoader\register(), Sanitizer\removeHTMLcomments(), Sanitizer\removeHTMLtags(), WatchedItem\removeWatch(), SearchHighlighter\removeWiki(), DifferenceEngine\renderNewRevision(), LinkHolderArray\replace(), ReplacementArray\replace(), MessageCache\replace(), LinkHolderArray\replaceInternal(), LinkHolderArray\replaceInterwiki(), WikitextContent\replaceSection(), WikiPage\replaceSectionContent(), LinkHolderArray\replaceText(), Http\request(), SiteSQLStore\reset(), JpegHandler\rotate(), BitmapHandler\rotate(), MediaWikiTestCase\run(), Hooks\run(), SiteSQLStore\saveSites(), MessageCache\saveToCaches(), Categoryfinder\scan_next_layer(), PrefixSearch\searchWithVariants(), MediaWikiTestCase\setUp(), SkinTemplate\setupTemplateForOutput(), DiffEngine\shiftBoundaries(), DifferenceEngine\showDiffPage(), Article\showPatrolFooter(), SiteSQLStore\siteFromRow(), LoadBalancer\sleep(), WordLevelDiff\split(), UploadBase\stashFile(), StreamFile\stream(), FileBackendStore\streamFile(), MediaWikiTestCase\tearDown(), File\transform(), BitmapHandler\transformCustom(), BitmapHandler\transformImageMagick(), MediaWiki_I18N\translate(), LockManager\unlockByType(), StripState\unstripType(), WikiPage\updateIfNewerOn(), WikiPage\updateRedirectOn(), WikiPage\updateRevisionOn(), OldLocalFile\upgradeRow(), LocalFile\upgradeRow(), LocalFile\upload(), UploadBase\verifyFile(), UploadBase\verifyMimeType(), UploadBase\verifyPartialFile(), UploadBase\verifyUpload(), Article\view(), LoadBalancer\waitFor(), LoadBalancer\waitForAll(), JobQueueGroup\waitForBackups(), JobQueue\waitForBackups(), XmlDumpWriter\writeLogItem(), XmlDumpWriter\writeRevision(), and xmlsafe().

◆ wfProfileOut()

wfProfileOut (   $functionname = 'missing')

Stop profiling of a function.

Parameters
string$functionnamename of the function we have profiled
Examples
/src/tests/phpunit/MediaWikiTestCase.php.

Definition at line 46 of file Profiler.php.

References Profiler\$__instance, and Profiler\instance().

Referenced by AjaxDispatcher\__construct(), ResourceLoader\__construct(), MappedDiff\__construct(), WordLevelDiff\__construct(), StubObject\_unstub(), JobQueue\ack(), EmailNotification\actuallyNotifyOnPageChange(), LinkCache\addLinkObj(), WatchedItem\addWatch(), OutputPage\addWikiTextTitle(), JobQueue\batchPush(), DiffFormatter\block(), SkinTemplate\buildContentActionUrls(), SkinTemplate\buildContentNavigationUrls(), ChangesFeed\buildItems(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), Skin\buildSidebar(), Profiler\calculateOverhead(), TableDiffFormatter\changed(), MediaWiki\checkMaxLag(), UploadBase\checkWarnings(), Block\chooseBlock(), SiteSQLStore\clear(), WordLevelDiff\closing(), ViewCountUpdate\collect(), LanguageKk\convertGrammar(), JobQueue\deduplicateRootJob(), JobQueue\delete(), Block\deleteIfExpired(), UploadBase\detectScript(), UploadBase\detectVirus(), DiffEngine\diff(), DiffEngine\diffLocal(), WikiExporter\do_list_authors(), WikiPage\doEditContent(), WikiPage\doEditUpdates(), LinksUpdate\doIncrementalUpdate(), Language\doMagicHook(), UserCache\doQuery(), LinkBatch\doQuery(), IndexPager\doQuery(), WikiPage\doQuickEditContent(), DjVuHandler\doTransform(), HTMLCacheUpdate\doUpdate(), DeferredUpdates\doUpdates(), WikiExporter\dumpFrom(), Xml\elementClean(), MWTidy\execExternalTidy(), MWTidy\execInternalTidy(), RunJobs\execute(), MWHttpRequest\execute(), CurlHttpRequest\execute(), PhpHttpRequest\execute(), LocalFileDeleteBatch\execute(), LinkBatch\executeInto(), SpecialRunJobs\executeJobs(), SpecialPageFactory\executePath(), PPFrame_DOM\expand(), TempFSFile\factory(), Article\fetchContent(), Article\fetchContentObject(), FormatMetadata\fetchExtendedMetadata(), ResourceLoader\filter(), HtmlFormatter\filterContent(), HtmlFormatter\fixLibXML(), JobQueue\flushCaches(), DiffFormatter\format(), Linker\formatComment(), FeedUtils\formatDiffRow(), SpecialProtectedtitles\formatRow(), DeletedContribsPager\formatRow(), ContribsPager\formatRow(), Linker\formatTemplates(), CoreParserFunctions\gender(), ChangesFeed\generateFeed(), DifferenceEngine\generateTextDiffBody(), MessageBlobStore\get(), MemcachedPeclBagOStuff\get(), ParserCache\get(), MWMemcached\get(), JobQueue\getAbandonedCount(), JobQueue\getAcquiredCount(), AllmessagesTablePager\getAllMessages(), JobQueueAggregator\getAllReadyWikiQueues(), User\getAutomaticGroups(), User\getBlockedStatus(), Block\getBlocksForIPList(), Skin\getCachedNotice(), SiteSQLStore\getCacheKey(), Title\getCascadeProtectionSources(), Language\getCaseMaps(), LoadBalancer\getConnection(), SwiftFileBackend\getContainerStat(), Article\getContentObject(), CreditsAction\getCredits(), AllmessagesTablePager\getCustomisedStatuses(), ResourceLoaderModule\getDefinitionMtime(), JobQueue\getDelayedCount(), DifferenceEngine\getDiffBody(), User\getEditCount(), User\getEffectiveGroups(), FormatMetadata\getExtendedMetadataFromFile(), FormatMetadata\getExtendedMetadataFromHook(), FileBackendStore\getFileSha1Base36(), FileBackendStore\getFileStat(), FileBackendStore\getFileXAttributes(), CategoryViewer\getHTML(), LocalisationCache\getItem(), WikiPage\getLastNAuthors(), Title\getLinkURL(), SpecialPageFactory\getList(), Category\getMembers(), DjVuHandler\getMetaTree(), ResourceLoaderFileModule\getModifiedTime(), ResourceLoaderStartUpModule\getModuleRegistrations(), MemcachedPeclBagOStuff\getMulti(), Skin\getNamespaceNotice(), WikiPage\getOldestRevision(), Title\getPageLanguage(), Revision\getParentLengths(), WikiPage\getParserOutput(), FSFile\getProps(), UploadBase\getRealPath(), Revision\getRevisionText(), FSFile\getSha1Base36(), SiteSQLStore\getSite(), Skin\getSiteNotice(), SiteSQLStore\getSites(), JobQueue\getSize(), RequestContext\getSkin(), Skin\getSkinNames(), ProtectedTitlesPager\getStartBody(), LogPager\getStartBody(), MergeHistoryPager\getStartBody(), LocalisationCache\getSubitem(), HtmlFormatter\getText(), ApiTokens\getTokenTypes(), BaseTemplate\getToolbox(), Title\getUserPermissionsErrorsInternal(), SpecialVersion\getVersion(), SpecialVersion\getVersionLinked(), SearchHighlighter\highlightSimple(), SearchHighlighter\highlightText(), SquidUpdate\HTCPPurge(), User\inDnsBlacklist(), ParserOptions\initialiseFromUser(), Category\initialize(), MediaWiki\initializeArticle(), Skin\initPage(), WikiPage\insertOn(), Revision\insertOn(), User\isBlockedFrom(), JobQueue\isEmpty(), User\isLocallyBlockedProxy(), JobQueue\isRootJobOldDuplicate(), Linker\link(), Linker\linkAttribs(), Linker\linkUrl(), MessageCache\load(), User\load(), MagicWord\load(), User\loadDefaults(), OldLocalFile\loadExtraFromDB(), LocalFile\loadExtraFromDB(), LocalFile\loadFromCache(), OldLocalFile\loadFromDB(), LocalFile\loadFromDB(), MessageCache\loadFromDB(), SiteSQLStore\loadSites(), Revision\loadText(), LockManager\lockByType(), MediaWiki\main(), Linker\makeBrokenImageLinkObj(), LinkHolderArray\makeHolder(), Linker\makeKnownLinkObj(), Linker\makeLinkObj(), ResourceLoader\makeModuleResponse(), ApiParse\makeParserOptions(), DatabaseMysqlBase\masterPosWait(), SquidUpdate\newFromLinksTo(), Revision\newNullRevision(), LanguageBe_tarask\normalizeForSearch(), LanguageYue\normalizeForSearch(), LanguageZh_hans\normalizeForSearch(), LanguageZh\normalizeForSearch(), Linker\normalizeSubpageLink(), SearchMySQL\normalizeText(), JobQueueAggregator\notifyQueueEmpty(), JobQueueAggregator\notifyQueueNonEmpty(), WatchAction\onSubmit(), UnwatchAction\onSubmit(), CreditsAction\onView(), HistoryAction\onView(), DatabaseMysqlBase\open(), LoadBalancer\openConnection(), LoadBalancer\openForeignConnection(), WordLevelDiff\orig(), OutputPage\output(), SkinTemplate\outputPage(), InfoAction\pageCounts(), SiteStats\pagesInNs(), MessageCache\parse(), MWHttpRequest\parseCookies(), MWHttpRequest\parseHeader(), HtmlFormatter\parseItemsToRemove(), AjaxDispatcher\performAction(), MediaWiki\performAction(), MediaWiki\performRequest(), UploadBase\performUpload(), User\pingLimiter(), JobQueue\pop(), SkinTemplate\prepareQuickTemplate(), BlockListPager\preprocessResults(), Preprocessor_Hash\preprocessToObj(), Preprocessor_DOM\preprocessToObj(), JobQueueAggregator\purge(), SquidUpdate\purge(), LocalFile\purgeCache(), LocalFile\purgeOldThumbnails(), LocalFile\purgeThumbnails(), DatabaseBase\query(), BacklinkCache\queryLinks(), LinksUpdate\queueRecursiveJobsForTable(), SvgHandler\rasterize(), LocalisationCache\readJSONFile(), LocalisationCache\readPHPFile(), LocalisationCache\readSourceFilesAndRegisterDeps(), MWCryptRand\realGenerate(), LocalisationCache\recache(), EnhancedChangesList\recentChangesBlock(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), OldChangesList\recentChangesLine(), EnhancedChangesList\recentChangesLine(), LocalFile\recordUpload2(), Category\refreshCounts(), ResourceLoader\register(), Sanitizer\removeHTMLcomments(), Sanitizer\removeHTMLtags(), WatchedItem\removeWatch(), SearchHighlighter\removeWiki(), DifferenceEngine\renderNewRevision(), LinkHolderArray\replace(), ReplacementArray\replace(), MessageCache\replace(), LinkHolderArray\replaceInternal(), LinkHolderArray\replaceInterwiki(), WikitextContent\replaceSection(), WikiPage\replaceSectionContent(), LinkHolderArray\replaceText(), Http\request(), SiteSQLStore\reset(), JpegHandler\rotate(), BitmapHandler\rotate(), MediaWikiTestCase\run(), Hooks\run(), SiteSQLStore\saveSites(), MessageCache\saveToCaches(), Categoryfinder\scan_next_layer(), PrefixSearch\searchWithVariants(), MediaWikiTestCase\setUp(), SkinTemplate\setupTemplateForOutput(), DiffEngine\shiftBoundaries(), DifferenceEngine\showDiffPage(), Article\showPatrolFooter(), SiteSQLStore\siteFromRow(), LoadBalancer\sleep(), WordLevelDiff\split(), UploadBase\stashFile(), StreamFile\stream(), FileBackendStore\streamFile(), MediaWikiTestCase\tearDown(), File\transform(), BitmapHandler\transformCustom(), BitmapHandler\transformImageMagick(), MediaWiki_I18N\translate(), LockManager\unlockByType(), StripState\unstripType(), WikiPage\updateIfNewerOn(), WikiPage\updateRedirectOn(), WikiPage\updateRevisionOn(), OldLocalFile\upgradeRow(), LocalFile\upgradeRow(), LocalFile\upload(), UploadBase\verifyFile(), UploadBase\verifyMimeType(), UploadBase\verifyPartialFile(), UploadBase\verifyUpload(), Article\view(), LoadBalancer\waitFor(), LoadBalancer\waitForAll(), JobQueueGroup\waitForBackups(), JobQueue\waitForBackups(), XmlDumpWriter\writeLogItem(), XmlDumpWriter\writeRevision(), and xmlsafe().