- 加入代码
import _ "net/http/pprof" go func() { log.Println(http.ListenAndServe("localhost:6060", nil)) }() - 编译并运行
- 新窗口打开命令行
内存对象分配的相关情况
正在使用的一些内存相关信息go tool pprof -alloc_space http://localhost:6060/debug/pprof/heapgo tool pprof -inuse_space http://127.0.0.1:6060/debug/pprof/heap pprof模式输入web- 效果图

go tool pprof
本文链接:https://blog.zxysilent.com/post/go-tool-pprof.html
-- EOF --
zxysilent发表于 2017-08-09 07:37:36,最后修改于 2017-11-04 12:09:05


Comments