go基础第二篇:利用pprof定位cpu和内存问题
摘要:在项目的main.go文件中引入 _ "net/http/pprof" 在main函数中加入: go func() { _ = http.ListenAndServe(":6060", nil) }() 保证6060端口能访问到,如在容器中部署的话,别忘了添加端口映射。如果有防火墙的话,别忘了放开端
阅读全文
posted @ 2020-07-29 14:45
posted @ 2020-07-29 14:45
posted @ 2020-07-27 19:05