return timeSpan from timers

to allow additional calculation
This commit is contained in:
Brian Gough 2016-03-15 13:52:40 +00:00
parent 29177f8de8
commit 622bbe3123

View file

@ -35,6 +35,7 @@ module.exports =
done:-> done:->
timeSpan = new Date - this.start timeSpan = new Date - this.start
statsd.timing(buildKey(this.key), timeSpan, this.sampleRate) statsd.timing(buildKey(this.key), timeSpan, this.sampleRate)
return timeSpan
gauge : (key, value, sampleRate = 1)-> gauge : (key, value, sampleRate = 1)->
statsd.gauge buildKey(key), value, sampleRate statsd.gauge buildKey(key), value, sampleRate