You are here

public static function StatsD::timing in StatsD 6

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

Log timing information

Parameters

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

$time: The ellapsed time (ms) to log

$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);
}