rcrowley/go-metrics — pull request #69 by mihasya (2014-08-21 06:27:49+00:00)
Title: don't report zero counters. it's expensive.

Things like `tigertonic.CountedByStatus` and `tigertonic.CountedByStatusXX` get really expensive when you have lots of endpoints that only return 1 or 2 of those status codes or status code ranges. The rest of the codes/ranges dutifully log 0's into Librato and out of your wallet.

Additionally, I think the code under `case metrics.Histogram` (now line 109) should be checked. To avoid sending empty updates, should the correct behavior be to get the `Sample` first and check that `sample.Count()` is greater than 0, instead of doing so on the histogram directly?