[ Status ] 完成Agent Metric部分
This commit is contained in:
@@ -23,7 +23,14 @@ const (
|
||||
BaseFuncOssUrlPrefix = "https://b2.107421.xyz/"
|
||||
)
|
||||
|
||||
var pool, _ = ants.NewPool(100, ants.WithNonblocking(false), ants.WithLogger(logger2.Log), ants.WithMaxBlockingTasks(30), ants.WithDisablePurge(true))
|
||||
// 创建协程池子
|
||||
var pool, _ = ants.NewPool(
|
||||
100,
|
||||
ants.WithNonblocking(false),
|
||||
ants.WithLogger(logger2.Log),
|
||||
ants.WithMaxBlockingTasks(30),
|
||||
ants.WithDisablePurge(true),
|
||||
)
|
||||
|
||||
var G = NewGlobal(
|
||||
pool,
|
||||
|
||||
@@ -56,7 +56,6 @@ func GetNetworkStatus() (*NetworkStatus, error) {
|
||||
}
|
||||
|
||||
// 休眠3秒
|
||||
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
var sentAfter uint64
|
||||
|
||||
@@ -43,6 +43,7 @@ func Ping() string {
|
||||
return "PONG"
|
||||
}
|
||||
|
||||
// todo change to go model
|
||||
func ReportAppStatus() *AgentStatus {
|
||||
|
||||
cpuStatus, cpuerr := GetCPUStatus()
|
||||
|
||||
Reference in New Issue
Block a user