func (r *reporter) reportMeter(name string, val metrics.Meter) {
	r.reportMetric(fmt.Sprintf("%s.count", name), Int, val.Count())
	r.reportMetric(fmt.Sprintf("%s.one-minute", name), Double, val.Rate1())
	r.reportMetric(fmt.Sprintf("%s.five-minute", name), Double, val.Rate5())
	r.reportMetric(fmt.Sprintf("%s.fifteen-minute", name), Double, val.Rate15())
	r.reportMetric(fmt.Sprintf("%s.mean", name), Double, val.RateMean())
}
Example #2
0
func updateMeter(meter gmetrics.Meter, newValue uint64) {
	va := int64(newValue) - meter.Count()
	meter.Mark(int64(va))
}