Files
ProjectOctopus/agent-go/a_status/Status_test.go
2024-06-14 10:37:40 +08:00

39 lines
704 B
Go
Executable File

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)
}