diff --git a/pkg/timeseries/timeseries.go b/pkg/timeseries/timeseries.go index 401b6ae..578ee1a 100644 --- a/pkg/timeseries/timeseries.go +++ b/pkg/timeseries/timeseries.go @@ -81,7 +81,8 @@ func AggAvg(points []TimePoint) *float64 { sum += *p.Value } } - return &sum + avg := sum / float64(len(points)) + return &avg } func AggMax(points []TimePoint) *float64 {