[ Cmii ] [ Octopus ] - reformat agent-go - 1
This commit is contained in:
38
agent-go/a_status/Status_test.go
Normal file
38
agent-go/a_status/Status_test.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package a_status
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
"wdd.io/agent-common/utils"
|
||||
)
|
||||
|
||||
func TestConvertToFormat(t *testing.T) {
|
||||
|
||||
convertToFormat := ConvertToFormat(99.92)
|
||||
|
||||
fmt.Println(convertToFormat)
|
||||
}
|
||||
|
||||
func TestReportAppStatus(t *testing.T) {
|
||||
|
||||
startTime := time.Now()
|
||||
agentStatus := ReportAgentMetric()
|
||||
|
||||
endTime := time.Now()
|
||||
elapsedTime := endTime.Sub(startTime)
|
||||
fmt.Println("函数执行时间:", elapsedTime)
|
||||
|
||||
utils.BeautifulPrint(agentStatus)
|
||||
}
|
||||
|
||||
func TestReportAgentInfo(t *testing.T) {
|
||||
startTime := time.Now()
|
||||
agentInfo := ReportAgentInfo()
|
||||
|
||||
endTime := time.Now()
|
||||
elapsedTime := endTime.Sub(startTime)
|
||||
fmt.Println("函数执行时间:", elapsedTime)
|
||||
|
||||
utils.BeautifulPrint(agentInfo)
|
||||
}
|
||||
Reference in New Issue
Block a user