pull/164/head
longXboy 5 years ago
parent 2470047483
commit eb0129cba4
  1. 2
      pkg/stat/sys/cpu/cpu_test.go
  2. 2
      pkg/stat/sys/cpu/psutilCPU_test.go

@ -10,7 +10,7 @@ func Test_CPUUsage(t *testing.T) {
var stat Stat
ReadStat(&stat)
fmt.Println(stat)
time.Sleep(time.Millisecond * 2600)
time.Sleep(time.Millisecond * 1000)
for i := 0; i < 6; i++ {
time.Sleep(time.Millisecond * 500)
ReadStat(&stat)

@ -11,7 +11,7 @@ func Test_PsutilCPU(t *testing.T) {
if err != nil {
t.Fatalf("newPsutilCPU failed!err:=%v", err)
}
time.Sleep(time.Millisecond * 600)
time.Sleep(time.Millisecond * 2600)
for i := 0; i < 6; i++ {
time.Sleep(time.Millisecond * 600)
u, err := cpu.Usage()

Loading…
Cancel
Save