The original go tool pprof (written in Perl) got this right.
The Go rewrite never has, but should.
Change-Id: Ie1fc571214c61b1b5654a0bc90e15eb889adf059
Reviewed-on: https://go-review.googlesource.com/32617
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
"internal/pprof/profile"
)
+// cpuProfileHandler is the Go pprof CPU profile handler URL.
+const cpuProfileHandler = "/debug/pprof/profile"
+
// PProf acquires a profile, and symbolizes it using a profile
// manager. Then it generates a report formatted according to the
// options selected through the flags package.
switch strings.ToLower(url.Path) {
case "", "/":
// Apply default /profilez.
- url.Path = "/profilez"
+ url.Path = cpuProfileHandler
case "/protoz":
// Rewrite to /profilez?type=proto
- url.Path = "/profilez"
+ url.Path = cpuProfileHandler
values.Set("type", "proto")
}