Fixed the calculation of the host node ticks

This commit is contained in:
Diptanu Choudhury
2016-06-12 01:14:51 +02:00
parent 9b6e720fbe
commit 73f5c29e38

View File

@@ -101,7 +101,7 @@ func (h *HostStatsCollector) Collect() (*HostStats, error) {
cs[idx].System = system
cs[idx].User = user
cs[idx].Total = total
ticksConsumed += (total / 100) * shelpers.TotalTicksAvailable()
ticksConsumed += (total / 100) * (shelpers.TotalTicksAvailable() / float64(len(cpuStats)))
}
hs.CPU = cs
hs.CPUTicksConsumed = ticksConsumed