[ Agent ] [ Status ] - refresh status part
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGetCPUStatus(t *testing.T) {
|
||||
cpuStatus, err := GetCPUStatus()
|
||||
cpuStatus, err := GetCPUMetric()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -20,3 +20,17 @@ func TestGetCPUStatus(t *testing.T) {
|
||||
fmt.Println(string(marshalIndent))
|
||||
|
||||
}
|
||||
|
||||
func TestGetCPUInfo(t *testing.T) {
|
||||
cpuInfo, err := GetCPUInfo()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
marshalIndent, err := json.MarshalIndent(cpuInfo, "", " ")
|
||||
if err != nil {
|
||||
fmt.Printf("error")
|
||||
}
|
||||
|
||||
fmt.Println(string(marshalIndent))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user