2020年7月29日

go基础第七篇:利用pprof定位cpu和内存问题

摘要: 在项目的main.go文件中引入 _ "net/http/pprof" 在main函数中加入: go func() { _ = http.ListenAndServe(":6060", nil) }() 保证6060端口能访问到,如在容器中部署的话,别忘了添加端口映射。如果有防火墙的话,别忘了放开端 阅读全文

posted @ 2020-07-29 14:45 koushr 阅读(605) 评论(0) 推荐(0) 编辑

导航