diff options
| author | Sean Liao <sean@liao.dev> | 2023-05-19 19:39:29 +0100 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-05-20 00:40:54 +0000 |
| commit | a0d53199b710bf7cbb8516c2d4ca0e02e15658e0 (patch) | |
| tree | c44114b55f56a2cb8d04edf0d9227847a74bb219 /src/net | |
| parent | 697644070c6e335b9c3dffdd4e82feb8038c3f22 (diff) | |
| download | go-a0d53199b710bf7cbb8516c2d4ca0e02e15658e0.tar.xz | |
net/http/pprof: document query params
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>
Diffstat (limited to 'src/net')
| -rw-r--r-- | src/net/http/pprof/pprof.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net/http/pprof/pprof.go b/src/net/http/pprof/pprof.go index db03af1c44..385eb423f7 100644 --- a/src/net/http/pprof/pprof.go +++ b/src/net/http/pprof/pprof.go @@ -27,6 +27,15 @@ // 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: |
