mirror of
https://github.com/kemko/nomad.git
synced 2026-01-10 12:25:42 +03:00
Fixed the calculation of the host node ticks
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user