rcrowley / go-metrics

Go port of Coda Hale's Metrics library
Other
3.43k stars 493 forks source link

Meter Memory Leak #201

Closed ariens-shopify closed 6 years ago

ariens-shopify commented 7 years ago

I metrics.GetOrRegisterMeter() many different meters to count events over the course of a second. Every second I emit the meter values to my downstream monitoring system before calling UnregisterAll().

The resources of the meters are never GC'd and the memory climbs drastically when many (50-hundreds) meters are created.

i19 commented 7 years ago

https://github.com/rcrowley/go-metrics/blob/master/meter.go#L37

imkira commented 7 years ago

This is actually a dup of #163 And, it is also supposed to be solved by #197