Merge pull request #710 from shirou/feature/cpu_returns_100

[cpu]: return 100 instead 1 if t1 are bigger than t2
pull/715/head
Lomanic 6 years ago committed by GitHub
commit 428e65cdb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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