添加了节点服务器,各个服务器之间支持多对多

This commit is contained in:
flswld
2022-12-24 04:14:33 +08:00
parent 16dd9c1e87
commit 7e86669628
92 changed files with 1429 additions and 287 deletions

View File

@@ -3,21 +3,19 @@ package statsviz_serve
import (
"net/http"
"hk4e/pkg/logger"
"github.com/arl/statsviz"
)
// Serve 性能检测
// 原生pprof /debug/pprof
// 可视化图表 /debug/statsviz
func Serve(addr string) error {
// 性能检测
err := statsviz.RegisterDefault()
if err != nil {
logger.Error("statsviz init error: %v", err)
return err
}
err = http.ListenAndServe(addr, nil)
if err != nil {
logger.Error("perf debug http start error: %v", err)
return err
}
return nil