MediaWiki master
Wikimedia\Stats\Metrics\GaugeMetric Class Reference

Gauge Metric Implementation. More...

Inherits Wikimedia\Stats\Metrics\MetricInterface.

Collaboration diagram for Wikimedia\Stats\Metrics\GaugeMetric:

Public Member Functions

 getTypeIndicator ()
 
Returns
string

 
 set (float $value)
 Sets metric to 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.
 
 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.
 

Detailed Description

Gauge Metric Implementation.

Gauge Metrics can be set to any numeric value and are identified by type "g".

Author
Cole White
Since
1.38

Definition at line 35 of file GaugeMetric.php.

Member Function Documentation

◆ getTypeIndicator()

Wikimedia\Stats\Metrics\GaugeMetric::getTypeIndicator ( )

Returns
string

Implements Wikimedia\Stats\Metrics\MetricInterface.

Definition at line 65 of file GaugeMetric.php.

◆ set()

Wikimedia\Stats\Metrics\GaugeMetric::set ( float $value)

Sets metric to value.

Parameters
float$value
Returns
void

Definition at line 51 of file GaugeMetric.php.


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