rcrowley / go-metrics

Go port of Coda Hale's Metrics library
Other
3.46k stars 494 forks source link

Resolution of meters cannot record marks lower than once per second #243

Open dhubler opened 6 years ago

dhubler commented 6 years ago

If I call metrics.GetOrRegisterMeter("x", Stats).Mark(1) once ever 2 seconds, then all the rates are 0. On one hand, this is reasonable considering the units are "marks/second" but this seems arbitrarily limiting.

As a work around, if I call metrics.GetOrRegisterMeter("x", Stats).Mark(100) And I divide the rate's by 100, I can a somewhat usable value.

Should I be using another method other than meter?