引入pprof
_ "net/http/pprof"
go func() {
        http.ListenAndServe("0.0.0.0:6060", nil)
    }()
go tool pprof --text http://127.0.0.1:6060/debug/pprof/heap
posted @ 2021-02-28 00:40  alpiny  阅读(1275)  评论(0)  编辑  收藏  举报