Example #1
0
func resetIntervalMetrics(m metrics.Map, t time.Time) {
	m.Set("current_interval_start", metrics.NewTime(t))
	metrics.AddToMaps(currentTotalMessagesLatenciesKey, 0, m)
	metrics.AddToMaps(currentTotalMessagesKey, 0, m)
	metrics.AddToMaps(currentTotalErrorsLatenciesKey, 0, m)
	metrics.AddToMaps(currentTotalErrorsKey, 0, m)
}
Example #2
0
func addToLatenciesAndCountsMaps(latenciesKey string, countKey string, latency time.Duration) {
	metrics.AddToMaps(latenciesKey, int64(latency), mMinute, mHour, mDay)
	metrics.AddToMaps(countKey, 1, mMinute, mHour, mDay)
}