// Aggregate returns aggregated histogram metrics
Aggregate returns aggregated histogram metrics
// Aggregate returns aggregated histogram metrics
func (m *HistogramMetrics) Aggregate() map[string]Data {
	m.value.mu.Lock()
	sort.Float64s(m.value.v)
	m.value.mu.Unlock()
	return map[string]Data{
		m.key + ".count":        m.count(),
		m.key + ".avg":          m.average(),
		m.key + ".max":          m.max(),
		m.key + ".median":       m.median(),
		m.key + ".95percentile": m.percentile(0.95),
	}
}
func ( m * HistogramMetrics ) Aggregate ( ) map [ string ] Data { m . value . mu . Lock ( ) sort . Float64s ( m . value . v ) m . value . mu . Unlock ( ) return map [ string ] Data { m . key + " " : m . count ( ) , m . key + " " : m . average ( ) , m . key + " " : m . max ( ) , m . key + " " : m . median ( ) , m . key + " " : m . percentile ( 0.95 ) , } }
Aggregate returns aggregated histogram metrics
Aggregate returns aggregated histogram metrics