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:
Francois Tur 2019-03-29 02:37:17 -04:00 committed by Miek Gieben
parent f6eb2a4c14
commit c144da2524
4 changed files with 53 additions and 11 deletions

View file

@ -14,11 +14,21 @@ func TestPProf(t *testing.T) {
{`pprof`, false},
{`pprof 1.2.3.4:1234`, false},
{`pprof :1234`, false},
{`pprof {}`, true},
{`pprof :1234 -1`, true},
{`pprof {
}`, false},
{`pprof /foo`, true},
{`pprof {
a b
}`, true},
{`pprof { block
}`, false},
{`pprof :1234 {
block 20
}`, false},
{`pprof {
block 20 30
}`, true},
{`pprof
pprof`, true},
}