README.md in statsd-client-0.0.5 vs README.md in statsd-client-0.0.6
- old
+ new
@@ -21,6 +21,10 @@
Statsd.decrement('system.nested_counter', 0.1) # decrementing with sampling (10%)
Statsd.timing('some_job_time', 20) # reporting job that took 20ms
Statsd.timing('some_job_time', 20, 0.05) # reporting job that took 20ms with sampling (5% sampling)
+ # passing a block to `timing` will capture the time it takes to execute
+ Statsd.time('some_job_time') do
+ # do some job
+ end