We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80d306d commit d7ea9ffCopy full SHA for d7ea9ff
src/runtime/pprof/pprof.go
@@ -44,7 +44,10 @@
44
// }
45
// defer f.Close() // error handling omitted for example
46
// runtime.GC() // get up-to-date statistics
47
-// if err := pprof.WriteHeapProfile(f); err != nil {
+// // Lookup("allocs") creates a profile similar to go test -memprofile.
48
+// // Alternatively, use Lookup("heap") for a profile
49
+// // that has inuse_space as the default index.
50
+// if err := pprof.Lookup("allocs").WriteTo(f, 0); err != nil {
51
// log.Fatal("could not write memory profile: ", err)
52
53
0 commit comments