1
0
mirror of https://github.com/golang/go synced 2024-11-16 20:14:48 -07:00

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>
This commit is contained in:
Sean Liao 2023-05-19 19:39:29 +01:00 committed by Gopher Robot
parent 697644070c
commit a0d53199b7

View File

@ -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: