MediaWiki REL1_40
|
Timing Metric Implementation. More...
Inherits Wikimedia\Stats\Metrics\MetricInterface.
Public Member Functions | |||||||
__construct ( $baseMetric, $logger) | |||||||
copyToStatsdAt (string $statsdNamespace) | |||||||
Copies metric operation to StatsD at provided namespace.
| |||||||
fresh () | |||||||
Returns metric with cleared labels.
| |||||||
getComponent () | |||||||
| |||||||
getLabelKeys () | |||||||
Returns the list of defined label keys.
| |||||||
getName () | |||||||
| |||||||
getSampleRate () | |||||||
| |||||||
getSamples () | |||||||
Returns subset of samples corresponding to sample rate setting.
| |||||||
getTypeIndicator () | |||||||
| |||||||
observe (float $value) | |||||||
Records a previously calculated observation. | |||||||
start () | |||||||
Starts a timer. | |||||||
stop () | |||||||
Stops a running timer. | |||||||
withLabel (string $key, string $value) | |||||||
Adds a label $key with $value.
| |||||||
withSampleRate (float $sampleRate) | |||||||
Sets sample rate on a new metric instance.
| |||||||
Public Member Functions inherited from Wikimedia\Stats\Metrics\MetricInterface | |||||||
__construct (BaseMetricInterface $baseMetric, LoggerInterface $logger) | |||||||
Timing Metric Implementation.
Timing metrics track duration data which can be broken into histograms. They are identified by type "ms".
Definition at line 38 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::__construct | ( | $baseMetric, | |
$logger ) |
Definition at line 62 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::copyToStatsdAt | ( | string | $statsdNamespace | ) |
Copies metric operation to StatsD at provided namespace.
string | $statsdNamespace |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 159 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::fresh | ( | ) |
Returns metric with cleared labels.
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 167 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::getComponent | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 110 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::getLabelKeys | ( | ) |
Returns the list of defined label keys.
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 142 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::getName | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 105 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::getSampleRate | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 125 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::getSamples | ( | ) |
Returns subset of samples corresponding to sample rate setting.
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 120 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::getTypeIndicator | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 115 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::observe | ( | float | $value | ) |
Records a previously calculated observation.
float | $value |
Definition at line 96 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::start | ( | ) |
Wikimedia\Stats\Metrics\TimingMetric::stop | ( | ) |
Wikimedia\Stats\Metrics\TimingMetric::withLabel | ( | string | $key, |
string | $value ) |
Adds a label $key with $value.
string | $key | |
string | $value |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 147 of file TimingMetric.php.
Wikimedia\Stats\Metrics\TimingMetric::withSampleRate | ( | float | $sampleRate | ) |
Sets sample rate on a new metric instance.
float | $sampleRate |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 130 of file TimingMetric.php.