diff options
| author | Hana (Hyang-Ah) Kim <hyangah@gmail.com> | 2018-11-06 17:48:08 -0500 |
|---|---|---|
| committer | Hyang-Ah Hana Kim <hyangah@gmail.com> | 2018-11-07 12:27:21 +0000 |
| commit | c0a40e4fe5d4649672d0d430ca26551841fc4852 (patch) | |
| tree | 4ccd82b68f0795d68bc43caff3cba7c9fabdb4d8 /src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go | |
| parent | 1100df58238a1b1c55af148a880b48caf4be6504 (diff) | |
| download | go-c0a40e4fe5d4649672d0d430ca26551841fc4852.tar.xz | |
cmd/vendor: update github.com/google/pprof
Sync @ fde099a (Oct 26, 2018)
Also update misc/nacl/testzip.proto to include new testdata.
Change-Id: If41590be9f395a591056e89a417b589c4ba71b1a
Reviewed-on: https://go-review.googlesource.com/c/147979
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go')
| -rw-r--r-- | src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go b/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go index 89bc558668..7becacd202 100644 --- a/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go +++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go @@ -69,16 +69,17 @@ func (ec *errorCatcher) PrintErr(args ...interface{}) { // webArgs contains arguments passed to templates in webhtml.go. type webArgs struct { - Title string - Errors []string - Total int64 - Legend []string - Help map[string]string - Nodes []string - HTMLBody template.HTML - TextBody string - Top []report.TextItem - FlameGraph template.JS + Title string + Errors []string + Total int64 + SampleTypes []string + Legend []string + Help map[string]string + Nodes []string + HTMLBody template.HTML + TextBody string + Top []report.TextItem + FlameGraph template.JS } func serveWebInterface(hostport string, p *profile.Profile, o *plugin.Options) error { @@ -199,8 +200,10 @@ func openBrowser(url string, o *plugin.Options) { for _, p := range []struct{ param, key string }{ {"f", "focus"}, {"s", "show"}, + {"sf", "show_from"}, {"i", "ignore"}, {"h", "hide"}, + {"si", "sample_index"}, } { if v := pprofVariables[p.key].value; v != "" { q.Set(p.param, v) @@ -230,8 +233,10 @@ func varsFromURL(u *gourl.URL) variables { vars := pprofVariables.makeCopy() vars["focus"].value = u.Query().Get("f") vars["show"].value = u.Query().Get("s") + vars["show_from"].value = u.Query().Get("sf") vars["ignore"].value = u.Query().Get("i") vars["hide"].value = u.Query().Get("h") + vars["sample_index"].value = u.Query().Get("si") return vars } @@ -262,6 +267,7 @@ func (ui *webInterface) render(w http.ResponseWriter, tmpl string, data.Title = file + " " + profile data.Errors = errList data.Total = rpt.Total() + data.SampleTypes = sampleTypes(ui.prof) data.Legend = legend data.Help = ui.help html := &bytes.Buffer{} |
