Merge pull request #103 from kardianos/cpu_test

Cpu test
pull/105/head
shirou 10 years ago
commit 127599b2cf

@ -82,7 +82,8 @@ func testCPUPercent(t *testing.T, percpu bool) {
t.Errorf("error %v", err)
}
for _, percent := range v {
if percent < 0.0 || percent > 100.0*float64(numcpu) {
// Check for slightly greater then 100% to account for any rounding issues.
if percent < 0.0 || percent > 100.0001*float64(numcpu) {
t.Fatalf("CPUPercent value is invalid: %f", percent)
}
}

Loading…
Cancel
Save