MediaWiki  1.27.4
SamplingStatsdClient Class Reference

A statsd client that applies the sampling rate to the data items before sending them. More...

Inheritance diagram for SamplingStatsdClient:
Collaboration diagram for SamplingStatsdClient:

Public Member Functions

 appendSampleRate ($data, $sampleRate=1)
 Sets sampling rate for all items in $data. More...
 
 send ($data, $sampleRate=1)
 

Protected Member Functions

 sampleData ($data)
 Throw away some of the data according to the sample rate. More...
 
 throwException (Exception $exception)
 

Detailed Description

A statsd client that applies the sampling rate to the data items before sending them.

Since
1.26

Definition at line 32 of file SamplingStatsdClient.php.

Member Function Documentation

SamplingStatsdClient::appendSampleRate (   $data,
  $sampleRate = 1 
)

Sets sampling rate for all items in $data.

The sample rate specified in a StatsdData entity overrides the sample rate specified here.

Definition at line 39 of file SamplingStatsdClient.php.

References use.

Referenced by send().

SamplingStatsdClient::sampleData (   $data)
protected

Throw away some of the data according to the sample rate.

Parameters
StatsdDataInterface[]$data
Returns
StatsdDataInterface[]
Exceptions
LogicException

Definition at line 113 of file SamplingStatsdClient.php.

References as.

Referenced by send().

SamplingStatsdClient::send (   $data,
  $sampleRate = 1 
)

Definition at line 62 of file SamplingStatsdClient.php.

References $e, appendSampleRate(), as, sampleData(), and throwException().

SamplingStatsdClient::throwException ( Exception  $exception)
protected

Definition at line 134 of file SamplingStatsdClient.php.

Referenced by send().


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