]> Cypherpunks repositories - gostls13.git/commitdiff
net/http/pprof: document query params
authorSean Liao <sean@liao.dev>
Fri, 19 May 2023 18:39:29 +0000 (19:39 +0100)
committerGopher Robot <gobot@golang.org>
Sat, 20 May 2023 00:40:54 +0000 (00:40 +0000)
Fixes #59452

Change-Id: Ia0b5a03565f663190c480ef9e26309fa85ff192c
Reviewed-on: https://go-review.googlesource.com/c/go/+/496144
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/net/http/pprof/pprof.go

index db03af1c44bdbe4c57ee4febd188fdc4f48b4cb4..385eb423f79b667d60f4d53a51646748f104da04 100644 (file)
 // If you are not using DefaultServeMux, you will have to register handlers
 // with the mux you are using.
 //
+// # Parameters
+//
+// Parameters can be passed via GET query params:
+//
+//   - debug=N (all profiles): response format: N = 0: binary (default), N > 0: plaintext
+//   - gc=N (heap profile): N > 0: run a garbage collection cycle before profiling
+//   - seconds=N (allocs, block, goroutine, heap, mutex, threadcreate profiles): return a delta profile
+//   - seconds=N (cpu (profile), trace profiles): profile for the given duration
+//
 // # Usage examples
 //
 // Use the pprof tool to look at the heap profile: