上传cmd 启动优化

This commit is contained in:
liwei1dao 2023-12-18 16:33:49 +08:00
parent ca643695b5
commit c30872f6cd
2 changed files with 9 additions and 6 deletions

View File

@ -2,18 +2,18 @@ package pprof_test
/*
查看堆栈调用信息
go tool pprof http://localhost:6060/debug/pprof/heap
go tool pprof http://122.51.39.132:9090/debug/pprof/heap
查看 30 秒内的 CPU 信息
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30
go tool pprof http://122.51.39.132:9090/debug/pprof/profile?seconds=30
查看 goroutine 阻塞
go tool pprof http://localhost:6060/debug/pprof/block
go tool pprof http://122.51.39.132:9090/debug/pprof/block
收集 5 秒内的执行路径
go tool pprof http://localhost:6060/debug/pprof/trace?seconds=5
go tool pprof http://122.51.39.132:9090/debug/pprof/trace?seconds=5
争用互斥持有者的堆栈跟踪
go tool pprof http://localhost:6060/debug/pprof/mutex
go tool pprof http://122.51.39.132:9090/debug/pprof/mutex
*/
/*
UI web 界面
curl -sK -v http://localhost:6060/debug/pprof/heap > heap.out
curl -sK -v http://122.51.39.132:9090/debug/pprof/heap > heap.out
go tool pprof -http=:8080 heap.out
*/

View File

@ -156,6 +156,9 @@ func start() {
log.Error("写入配置文件失败!", log.Field{Key: "err", Value: err.Error()})
return
}
if config.IsCross && v.Type == comm.Service_Gateway {
continue
}
switch v.Type {
case comm.Service_Gateway: //网关服务
gateways = append(gateways, v)