Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.
hahafool edited this page Mar 31, 2022 · 1 revision

memory pprof指导:

命令行给出 -mp参数后,运行开始就会有提示,

等到程序退出后,命令行就会给出一个临时文件地址,然后我们运行

go tool pprof -http=:9999 /var/folders/zm/x0r8r1yx2x54n3xlp14jly180000gn/T/profile2373121496/mem.pprof

即可自动打开浏览器,然后会有个图,看图就能了解内存使用分配情况

Clone this wiki locally