Sha256: 15fa3396d8ca5d582aaf2c96f26fee345cf316098065a8a50b2bb617ee959b4c
Contents?: true
Size: 300 Bytes
Versions: 3
Compression:
Stored size: 300 Bytes
Contents
class Circuitbox class Timer class Simple def time(service, notifier, metric_name) before = Time.now.to_f result = yield total_time = Time.now.to_f - before notifier.metric_gauge(service, metric_name, total_time) result end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
circuitbox-2.0.0.pre3 | lib/circuitbox/timer/simple.rb |
circuitbox-2.0.0.pre2 | lib/circuitbox/timer/simple.rb |
circuitbox-2.0.0.pre1 | lib/circuitbox/timer/simple.rb |