Shopify / statsd-instrument

A StatsD client for Ruby apps. Provides metaprogramming methods to inject StatsD instrumentation into your code.
http://shopify.github.io/statsd-instrument
MIT License
574 stars 97 forks source link

Improve datagram compatibility test #203

Closed wvanbergen closed 5 years ago

wvanbergen commented 5 years ago

We now run all the compatibility tests in the following modes:

We now also have tests for measure and distribution in block execution time measuring mode.

There is also a reliability improvement by making sure that we always emit a packet by stubbing rand. That way, we can simply call the StatsD method once, rather than in a loop, and get rid of all the thread and draining logic.

wvanbergen commented 5 years ago

I've simplified the implementation significantly, by stubbing rand (thanks Jean for the idea) so we are sure that every StatsD invocation will actually emit a datagram.