lib/napa/stats_d_timer.rb in napa-0.3.0 vs lib/napa/stats_d_timer.rb in napa-0.4.0
- old
+ new
@@ -1,10 +1,10 @@
module Napa
module StatsDTimer
def report_time(timer_name)
start_time = Time.now
yield
- response_time = Time.now - start_time
+ response_time = (Time.now - start_time) * 1000 # statsd reports timers in milliseconds
Napa::Stats.emitter.timing(timer_name, response_time)
end
module ClassMethods
def report_time(timer_name)