feat 接入Prometheus

This commit is contained in:
2025-12-17 21:05:12 +08:00
parent efa9f50d3e
commit da91cff056
24 changed files with 289 additions and 60 deletions

View File

@@ -4,6 +4,7 @@ import (
"common/utils"
"robot/config"
"strconv"
"time"
)
type Manager struct {
@@ -19,8 +20,9 @@ func NewManager(addr string) *Manager {
func (c *Manager) Start() {
cfg := config.Get().Client
for i := 0; i < 300; i++ {
for i := int32(0); i < cfg.Count; i++ {
client := NewClient(c.addr, strconv.Itoa(utils.RandInt(int(cfg.UID[0]), int(cfg.UID[1]))))
client.Start()
time.Sleep(time.Millisecond * 10)
}
}