1
0
mirror of https://github.com/golang/go synced 2024-11-23 14:40:02 -07:00

net/http/pprof: Use relative links to profiles in index html

This allows /debug/pprof/ and descendents to be used through
http.StripPrefix and other path rewriting handlers.

Change-Id: I53673876c107bbfaf430123ead78e6524b42ac21
Reviewed-on: https://go-review.googlesource.com/7351
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Matt Joiner 2015-03-11 17:52:57 +11:00 committed by Andrew Gerrand
parent de573f8748
commit 4f489f59c2

View File

@ -228,11 +228,11 @@ var indexTmpl = template.Must(template.New("index").Parse(`<html>
profiles:<br>
<table>
{{range .}}
<tr><td align=right>{{.Count}}<td><a href="/debug/pprof/{{.Name}}?debug=1">{{.Name}}</a>
<tr><td align=right>{{.Count}}<td><a href="{{.Name}}?debug=1">{{.Name}}</a>
{{end}}
</table>
<br>
<a href="/debug/pprof/goroutine?debug=2">full goroutine stack dump</a><br>
<a href="goroutine?debug=2">full goroutine stack dump</a><br>
</body>
</html>
`))