github/statsd-ruby — pull request #10 by zerowidth (2014-07-30 02:19:39+00:00)
Title: Allow floating point times

The :microscope: experiments we've been doing in dotcom have been using the `#timing` method to ship floating point millisecond values (e.g. [science instrumentation](https://github.com/github/github/blob/d6342051e4e6c2cabdcbf6fa4c51d0de27e9a8a8/config/instrumentation/science.rb#L5)), and when we switched our code over to using the `#time { ... }` blocks (e.g. [`Ability.can?`](https://github.com/github/github/blob/d6342051e4e6c2cabdcbf6fa4c51d0de27e9a8a8/app/models/ability.rb#L177)), I noticed our measurements were locked to integer millsecond values and often being rounded down to 0.

This PR changes the client to allow us to track sub-millisecond performance timing. The spec says "integers", but everything else disagrees, transmitting and storing everything as doubles:

* https://github.com/github/metronome/blob/master/src/metronome.h#L29
* https://github.com/graphite-project/carbon/blob/master/lib/carbon/protocols.py#L75
* https://github.com/graphite-project/whisper/blob/master/whisper.py#L81

cc @vmg @jssjr @azizshamim

If y'all approve, I'll package this gem and roll it into a PR on github/github.