delete test

pull/164/head
longXboy 5 years ago
parent b532e35653
commit 248f4258ef
  1. 23
      pkg/stat/sys/cpu/psutilCPU_test.go

@ -1,23 +0,0 @@
package cpu
import (
"fmt"
"testing"
"time"
)
func Test_PsutilCPU(t *testing.T) {
cpu, err := newPsutilCPU(time.Millisecond * 500)
if err != nil {
t.Fatalf("newPsutilCPU failed!err:=%v", err)
}
time.Sleep(time.Millisecond * 4600)
for i := 0; i < 6; i++ {
time.Sleep(time.Millisecond * 600)
u, err := cpu.Usage()
if u == 0 {
t.Fatalf("get cpu from psutil failed!cpu usage is zero!err:=%v", err)
}
fmt.Println(u)
}
}
Loading…
Cancel
Save