Closed dup2X closed 6 years ago
_go-metrics_
建议复用MetricsClient.r + Registry.Each +Counter.Snapshot() 来代替 一个重复的MetricsClient.d多次计数的方式 来实现MetricsClient.report()。可以最大程度减少alloc、和incr、decr的代价。
MetricsClient.r
Registry.Each
Counter.Snapshot()
MetricsClient.d
MetricsClient.report()
_go-metrics_