danielcrenna/metrics-net — pull request #17 by slumos (2013-03-20 21:59:07+00:00)
Title: fixes two bugs in ExponentialDecayingSample

that cause it to store far fewer than the requested number of values most of the time due to
generating infinite priorities.

Support.Random was frequently returning 0, causing Weight() / Random
to be Infinity. Support.ThreadLocalRandom is more analogous to the
original Java metrics and includes a method to avoid 0 by returning
Max(random, Math.Epsilon).

The use of Ticks instead of Seconds (as in the original Java metrics)
causes the Math.Exp(timestamp - _startTime) to quickly overflow double
and return PositiveInfinity.