mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
delete test
This commit is contained in:
parent
b532e35653
commit
248f4258ef
@ -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…
x
Reference in New Issue
Block a user