MediaWiki REL1_40
|
Gauge 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 () | |||||||
| |||||||
set (float $value) | |||||||
Sets metric to value. | |||||||
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) | |||||||
Gauge Metric Implementation.
Gauge Metrics can be set to any numeric value and are identified by type "g".
Definition at line 37 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::__construct | ( | $baseMetric, | |
$logger ) |
Definition at line 58 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::copyToStatsdAt | ( | string | $statsdNamespace | ) |
Copies metric operation to StatsD at provided namespace.
string | $statsdNamespace |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 132 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::fresh | ( | ) |
Returns metric with cleared labels.
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 140 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::getComponent | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 83 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::getLabelKeys | ( | ) |
Returns the list of defined label keys.
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 115 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::getName | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 78 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::getSampleRate | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 98 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::getSamples | ( | ) |
Returns subset of samples corresponding to sample rate setting.
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 93 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::getTypeIndicator | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 88 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::set | ( | float | $value | ) |
Sets metric to value.
float | $value |
Definition at line 69 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::withLabel | ( | string | $key, |
string | $value ) |
Adds a label $key with $value.
string | $key | |
string | $value |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 120 of file GaugeMetric.php.
Wikimedia\Stats\Metrics\GaugeMetric::withSampleRate | ( | float | $sampleRate | ) |
Sets sample rate on a new metric instance.
float | $sampleRate |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 103 of file GaugeMetric.php.