etsy/statsd — pull request #133 by otac0n (2012-07-31 20:01:51+00:00)
Title: Improved the quality of randomness used for sampling.

The previous version had issues with rapidly creating and disposing of StatsdPipe instances.

If, say, 100 were created in the same millisecond, they would all be given the same Random seed.

In this version, we use ThreadStatic storage to reduce the number of Random instances created, maintain thread safety, and allow randomness to vary much more quickly that per-millisecond.