pprof导入 import _ "net/http/pprof" go func() { log.Println(http.ListenAndServe(":6060", nil)) }() fmt.Printf("pprof start!") 内存使用情况 go tool pprof --text http://localhost:6060/debug/pprof/heap