|
MediaWiki master
|
Counter Metric Implementation. More...
Inherits Wikimedia\Stats\Metrics\MetricInterface.

Public Member Functions | |
| getTypeIndicator () | |
| |
| increment () | |
| Increments metric by one. | |
| incrementBy (float $value) | |
| Increments metric by provided value. | |
| setBucket ( $value) | |
| Sets the bucket value. | |
Public Member Functions inherited from Wikimedia\Stats\Metrics\MetricInterface | |
| __construct (BaseMetricInterface $baseMetric, LoggerInterface $logger) | |
| copyToStatsdAt ( $statsdNamespaces) | |
| Copies metric operation to StatsD at provided namespace. | |
| fresh () | |
| Returns metric with cleared labels. | |
| getComponent () | |
| getLabelKeys () | |
| Returns the list of defined label keys. | |
| getName () | |
| getSampleCount () | |
| Returns a count of samples recorded by the metric. | |
| getSampleRate () | |
| getSamples () | |
| Returns subset of samples corresponding to sample rate setting. | |
| isHistogram () | |
| Indicates the metric instance is used in a Histogram. | |
| setLabel (string $key, string $value) | |
| Adds a label $key with $value. | |
| setLabels (array $labels) | |
| Convenience function to set a number of labels at once. | |
| setSampleRate (float $sampleRate) | |
| Sets sample rate on a new metric instance. | |
Counter Metric Implementation.
Counter Metrics only ever increase and are identified by type "c".
Definition at line 23 of file CounterMetric.php.
| Wikimedia\Stats\Metrics\CounterMetric::getTypeIndicator | ( | ) |
Implements Wikimedia\Stats\Metrics\MetricInterface.
Definition at line 90 of file CounterMetric.php.
| Wikimedia\Stats\Metrics\CounterMetric::increment | ( | ) |
Increments metric by one.
Definition at line 36 of file CounterMetric.php.
| Wikimedia\Stats\Metrics\CounterMetric::incrementBy | ( | float | $value | ) |
Increments metric by provided value.
| float | $value |
Definition at line 46 of file CounterMetric.php.
| Wikimedia\Stats\Metrics\CounterMetric::setBucket | ( | $value | ) |
Sets the bucket value.
Only allows float, int, or literal '+Inf' as value.
WARNING: This function exists to support HistogramMetric. It should not be used elsewhere.
| float | int | string | $value |
Definition at line 79 of file CounterMetric.php.