MediaWiki master
MediaWiki\Profiler\ProfilingContext Class Reference

Class for tracking request-level classification information for profiling/stats/logging. More...

Public Member Functions

 getEntryPoint ()
 
 getHandler ()
 
 getHandlerMetricPrefix ()
 
 init (string $entryPoint, string $handler)
 Set entry point name and principle handler name for this request.
 
 isInitialized ()
 

Static Public Member Functions

static destroySingleton ()
 
static singleton ()
 

Detailed Description

Class for tracking request-level classification information for profiling/stats/logging.

Note
: this avoids the use of MediaWikiServices so that shutdown functions can use it
Since
1.40

Definition at line 12 of file ProfilingContext.php.

Member Function Documentation

◆ destroySingleton()

static MediaWiki\Profiler\ProfilingContext::destroySingleton ( )
static
Access: internal
For testing only

Definition at line 76 of file ProfilingContext.php.

◆ getEntryPoint()

MediaWiki\Profiler\ProfilingContext::getEntryPoint ( )
Returns
string Entry point name for this request (e.g. "index", "api", "load")

Definition at line 51 of file ProfilingContext.php.

◆ getHandler()

MediaWiki\Profiler\ProfilingContext::getHandler ( )
Returns
string Handler name for this request (e.g. "edit", "recentchanges")

Definition at line 58 of file ProfilingContext.php.

◆ getHandlerMetricPrefix()

MediaWiki\Profiler\ProfilingContext::getHandlerMetricPrefix ( )
Returns
string Statsd metric name prefix for this entry point and handler

Definition at line 65 of file ProfilingContext.php.

◆ init()

MediaWiki\Profiler\ProfilingContext::init ( string $entryPoint,
string $handler )

Set entry point name and principle handler name for this request.

Parameters
string$entryPointEntry point script name (alphanumeric characters)
string$handlerHandler name (printable ASCII characters)

Definition at line 32 of file ProfilingContext.php.

◆ isInitialized()

MediaWiki\Profiler\ProfilingContext::isInitialized ( )
Returns
bool Whether the context was initialized yet

Definition at line 44 of file ProfilingContext.php.

◆ singleton()

static MediaWiki\Profiler\ProfilingContext::singleton ( )
static

The documentation for this class was generated from the following file: