You are here

public static function StatsD::timing in StatsD 7

Same name and namespace in other branches
  1. 6 includes/statsd.inc \StatsD::timing()
  2. 7.2 includes/statsd.inc \StatsD::timing()

Log timing information.

Parameters

string $stat: A string of the metric to log timing info for.

int $time: The elapsed time (ms) to log.

float $sample_rate: A float between 0 and 1 representing the sampling rate.

1 call to StatsD::timing()
statsd_call in ./statsd.module
The generic statsd wrapper. Used for convenience.

File

includes/statsd.inc, line 22

Class

StatsD
Sends statistics to the stats daemon over UDP

Code

public static function timing($stat, $time, $sample_rate = NULL) {
  self::send(array(
    $stat => "{$time}|ms",
  ), $sample_rate);
}