use 10microsend duration for CPUPercent test.
This commit is contained in:
parent
6adc13e592
commit
5169be59e4
|
@ -67,8 +67,9 @@ func testCPUPercent(t *testing.T, percpu bool) {
|
||||||
if (percpu && len(v) != numcpu) || (!percpu && len(v) != 1) {
|
if (percpu && len(v) != numcpu) || (!percpu && len(v) != 1) {
|
||||||
t.Fatalf("wrong number of entries from CPUPercent: %v", v)
|
t.Fatalf("wrong number of entries from CPUPercent: %v", v)
|
||||||
}
|
}
|
||||||
for i := 0; i < 1000; i++ {
|
for i := 0; i < 100; i++ {
|
||||||
v, err := CPUPercent(0, percpu)
|
duration := time.Duration(10) * time.Microsecond
|
||||||
|
v, err := CPUPercent(duration, percpu)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("error %v", err)
|
t.Errorf("error %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue