MediaWiki REL1_39
Wikimedia\Metrics\TimingMetric Class Reference

Public Member Functions

 __construct (array $config, MetricUtils $metricUtils)
 
 observe (float $value, array $labels=[])
 
 render ()
 
 validateLabels (array $labels=[])
 Validate provided labels.
 

Detailed Description

Definition at line 32 of file TimingMetric.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Metrics\TimingMetric::__construct ( array $config,
MetricUtils $metricUtils )
Parameters
array$configassociative array:
  • name: (string) The metric name
  • extension: (string) The extension generating the metric
  • labels: (array) List of metric dimensional instantiations for filters and aggregations
  • sampleRate: (float) Optional sampling rate to apply
MetricUtils$metricUtils

Definition at line 54 of file TimingMetric.php.

References Wikimedia\Metrics\MetricUtils\setTypeIndicator(), and Wikimedia\Metrics\MetricUtils\validateConfig().

Member Function Documentation

◆ observe()

Wikimedia\Metrics\TimingMetric::observe ( float $value,
array $labels = [] )
Parameters
float$value
string[]$labels

Definition at line 73 of file TimingMetric.php.

◆ render()

Wikimedia\Metrics\TimingMetric::render ( )
Returns
string[]

Definition at line 84 of file TimingMetric.php.

◆ validateLabels()

Wikimedia\Metrics\TimingMetric::validateLabels ( array $labels = [])

Validate provided labels.

Parameters
string[]$labels

Definition at line 65 of file TimingMetric.php.


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