MediaWiki REL1_40
|
Counter 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 () | |||||||
| |||||||
increment () | |||||||
Increments metric by one. | |||||||
incrementBy (int $value, array $labels=[]) | |||||||
Increments metric by provided 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) | |||||||
Counter Metric Implementation.
Counter Metrics only ever increase and are identified by type "c".
Definition at line 37 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::__construct | ( | $baseMetric, | |
$logger ) |
Definition at line 58 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::copyToStatsdAt | ( | string | $statsdNamespace | ) |
Copies metric operation to StatsD at provided namespace.
string | $statsdNamespace |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 142 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::fresh | ( | ) |
Returns metric with cleared labels.
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 150 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::getComponent | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 93 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::getLabelKeys | ( | ) |
Returns the list of defined label keys.
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 125 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::getName | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 88 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::getSampleRate | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 108 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::getSamples | ( | ) |
Returns subset of samples corresponding to sample rate setting.
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 103 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::getTypeIndicator | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 98 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::increment | ( | ) |
Wikimedia\Stats\Metrics\CounterMetric::incrementBy | ( | int | $value, |
array | $labels = [] ) |
Increments metric by provided value.
int | $value | |
string[] | $labels |
Definition at line 79 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::withLabel | ( | string | $key, |
string | $value ) |
Adds a label $key with $value.
string | $key | |
string | $value |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 130 of file CounterMetric.php.
Wikimedia\Stats\Metrics\CounterMetric::withSampleRate | ( | float | $sampleRate | ) |
Sets sample rate on a new metric instance.
float | $sampleRate |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 113 of file CounterMetric.php.