在初始化时即获取CPU数量

This commit is contained in:
刘祥超
2021-01-25 19:40:57 +08:00
parent 50b7d9c51f
commit 3b22a800f6
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ func TestNodeStatusExecutor_CPU(t *testing.T) {
}
t.Log("physical count:", countPhysicalCPU)
percents, err := cpu.Percent(100 * time.Millisecond, false)
percents, err := cpu.Percent(100*time.Millisecond, false)
if err != nil {
t.Fatal(err)
}