Method: Statsd#timing

Defined in:
lib/statsd.rb

#timing(stat, ms, sample_rate = 1) ⇒ Object

Sends a timing (in ms) for the given stat to the statsd server. The sample_rate determines what percentage of the time this report is sent. The statsd server then uses the sample_rate to correctly track the average timing for the stat.

Parameters:

  • stat (String)

    stat name

  • ms (Integer)

    timing in milliseconds

  • sample_rate (Numeric) (defaults to: 1)

    sample rate, 1 for always



412
413
414
# File 'lib/statsd.rb', line 412

def timing(stat, ms, sample_rate=1)
  send_stats stat, ms, :ms, sample_rate
end