[cpu]: return 100 instead 1 if t1 are bigger than t2

pull/710/head
shirou 6 years ago
parent 0e6ea68690
commit 86fdae99e1

@ -111,7 +111,7 @@ func calculateBusy(t1, t2 TimesStat) float64 {
return 0 return 0
} }
if t2All <= t1All { if t2All <= t1All {
return 1 return 100
} }
return math.Min(100, math.Max(0, (t2Busy-t1Busy)/(t2All-t1All)*100)) return math.Min(100, math.Max(0, (t2Busy-t1Busy)/(t2All-t1All)*100))
} }

Loading…
Cancel
Save