[ Cmii ] [ Octopus ] - reformat agent-go - 1

This commit is contained in:
zeaslity
2024-03-29 11:39:14 +08:00
parent aa4412f042
commit 1be48aaac2
52 changed files with 683 additions and 557 deletions

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