Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker Class Reference

Helper for tracking accesses of Lua functions. More...

Public Member Functions

 __construct (StatsdDataFactoryInterface $statsdDataFactory, $siteId, $siteGroup, $trackLuaFunctionCallsPerSiteGroup, $trackLuaFunctionCallsPerWiki, $sampleRate)
 
 incrementKey ( $key)
 Prefix and increment the given statsd key.
 

Private Member Functions

 getPrefixedKeys ( $key)
 

Private Attributes

 $statsdDataFactory
 
 $siteId
 
 $siteGroup
 
 $trackLuaFunctionCallsPerSiteGroup
 
 $trackLuaFunctionCallsPerWiki
 
 $sampleRate
 

Detailed Description

Helper for tracking accesses of Lua functions.

Author
Marius Hoch

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker::__construct ( StatsdDataFactoryInterface $statsdDataFactory,
$siteId,
$siteGroup,
$trackLuaFunctionCallsPerSiteGroup,
$trackLuaFunctionCallsPerWiki,
$sampleRate )
Parameters
StatsdDataFactoryInterface$statsdDataFactory
string$siteId
string$siteGroup
bool$trackLuaFunctionCallsPerSiteGroup
bool$trackLuaFunctionCallsPerWiki
float$sampleRateA number in the range of [0, 1], representing the fraction of counter increments that will be reported from Lua.

Member Function Documentation

◆ getPrefixedKeys()

Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker::getPrefixedKeys ( $key)
private
Parameters
string$key
Returns
string[]

◆ incrementKey()

Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker::incrementKey ( $key)

Prefix and increment the given statsd key.

Parameters
string$key

Member Data Documentation

◆ $sampleRate

Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker::$sampleRate
private

◆ $siteGroup

Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker::$siteGroup
private

◆ $siteId

Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker::$siteId
private

◆ $statsdDataFactory

Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker::$statsdDataFactory
private

◆ $trackLuaFunctionCallsPerSiteGroup

Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker::$trackLuaFunctionCallsPerSiteGroup
private

◆ $trackLuaFunctionCallsPerWiki

Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker::$trackLuaFunctionCallsPerWiki
private

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