Use correct key in Metrics.timing

This commit is contained in:
James Allen 2014-05-07 11:08:46 +01:00
parent f4895fb04f
commit befb48a20f

View file

@ -17,12 +17,12 @@ module.exports =
statsd.increment buildKey(key), sampleRate
timing: (key, timeSpan, sampleRate)->
statsd.timing(key, timeSpan, sampleRate)
statsd.timing(buildKey(key), timeSpan, sampleRate)
Timer : class
constructor :(key, sampleRate = 1)->
this.start = new Date()
this.key = buildKey(key)
this.key = key
this.sampleRate = sampleRate
done:->
timeSpan = new Date - this.start