(name string, r metrics.Registry)
| 18 | ) |
| 19 | |
| 20 | func getOrRegisterHistogram(name string, r metrics.Registry) metrics.Histogram { |
| 21 | return r.GetOrRegister(name, func() metrics.Histogram { |
| 22 | return metrics.NewHistogram(metrics.NewExpDecaySample(metricsReservoirSize, metricsAlphaFactor)) |
| 23 | }).(metrics.Histogram) |
| 24 | } |
| 25 | |
| 26 | func getMetricNameForBroker(name string, broker *Broker) string { |
| 27 | // Use broker id like the Java client as it does not contain '.' or ':' characters that |