diff options
Diffstat (limited to 'plugin/pprof/README.md')
-rw-r--r-- | plugin/pprof/README.md | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/plugin/pprof/README.md b/plugin/pprof/README.md index 27d64aee7..4ff6c6e38 100644 --- a/plugin/pprof/README.md +++ b/plugin/pprof/README.md @@ -17,10 +17,16 @@ This plugin can only be used once per Server Block. ## Syntax ~~~ -pprof [ADDRESS] +pprof [ADDRESS] { + block [RATE] +} ~~~ -If not specified, ADDRESS defaults to localhost:6053. +- If not specified, **ADDRESS** defaults to localhost:6053. + +- `block` option allow to enable the `block` profiling. see [Diagnostics, chapter profiling](https://golang.org/doc/diagnostics.html). +if you need to use `block` profile, set a positive value to **RATE**. See [runtime.SetBlockProfileRate](https://golang.org/pkg/runtime/#SetBlockProfileRate). + if not specified, **RATE** default's to 1. if `block` option is not specified the `block` profiling is disabled. ## Examples @@ -42,11 +48,13 @@ Listen on an alternate address: } ~~~ -Listen on an all addresses on port 6060: +Listen on an all addresses on port 6060: and enable block profiling ~~~ txt . { - pprof :6060 + pprof :6060 { + block + } } ~~~ |