mirror of
https://github.com/coredns/coredns.git
synced 2025-12-17 07:45:13 -05:00
plugin/pprof - add option to enable block profiling (#2729)
* - add an option for block profiling to plugin pprof * - move option block into nested block
This commit is contained in:
committed by
Miek Gieben
parent
f6eb2a4c14
commit
c144da2524
@@ -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
|
||||
}
|
||||
}
|
||||
~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user