diff --git a/vsphere-influxdb.go b/vsphere-influxdb.go index 59ed89e..69df8ec 100644 --- a/vsphere-influxdb.go +++ b/vsphere-influxdb.go @@ -684,7 +684,7 @@ func average(n ...int64) int64 { for _, i := range n { if i >= 0 { count++ - total++ + total += i } } favg := float64(total) / float64(count)