]> Cypherpunks repositories - gostls13.git/commitdiff
net/http/pprof: document the trace endpoint is for execution trace
authorHana (Hyang-Ah) Kim <hyangah@gmail.com>
Tue, 28 Apr 2020 16:11:14 +0000 (12:11 -0400)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Sat, 9 May 2020 04:46:25 +0000 (04:46 +0000)
Update google/pprof#529

Change-Id: Iec3b343a487b399ada3a6f73c120b5f7ed8938be
Reviewed-on: https://go-review.googlesource.com/c/go/+/230538
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
src/net/http/pprof/pprof.go

index 4fd19eb539d282e0143bac48e0430c1373807402..81df0448e94d100ab4f3df92875e114375f52a2c 100644 (file)
 //
 //     go tool pprof http://localhost:6060/debug/pprof/block
 //
-// Or to collect a 5-second execution trace:
-//
-//     wget http://localhost:6060/debug/pprof/trace?seconds=5
-//
 // Or to look at the holders of contended mutexes, after calling
 // runtime.SetMutexProfileFraction in your program:
 //
 //     go tool pprof http://localhost:6060/debug/pprof/mutex
 //
+// The package also exports a handler that serves execution trace data
+// for the "go tool trace" command. To collect a 5-second execution trace:
+//
+//     wget -O trace.out http://localhost:6060/debug/pprof/trace?seconds=5
+//     go tool trace trace.out
+//
 // To view all available profiles, open http://localhost:6060/debug/pprof/
 // in your browser.
 //