后浪笔记一零二四

性能分析

curl http://127.0.0.1:8888/cmds {“cmds”:["/cmds/loglevel","/cmds/config","/debug/pprof/cmdline","/debug/pprof/profile","/debug/pprof/symbol","/debug/pprof/trace","/cmds","/version"],“errorcode”:0,“message”:""}

pprof

  1. 使用配置有go环境并且与idc网络互通的机器 go tool pprof http://${ip}:${port}/debug/pprof/profile?seconds=20

  2. 将pprof文件下载到本地,本地go工具进行分析 curl http://${ip}:${port}/debug/pprof/profile?seconds=20 > profile.out go tool pprof profile.out

curl http://${ip}:${port}/debug/pprof/trace?seconds=20 > trace.out go tool trace trace.out

  1. 官方火焰图代理服务 http://100.116.32.91:8080/ui/, 进入网站后,在上面配置好admin服务的ip和port之后,就可以看到火焰图了

专题:

本文发表于 2022-09-13,最后修改于 2022-09-13。

本站永久域名「 jiavvc.top 」,也可搜索「 后浪笔记一零二四 」找到我。


上一篇 « token 下一篇 » go-test

赞赏支持

请我吃鸡腿 =^_^=

i ysf

云闪付

i wechat

微信

推荐阅读

Big Image