MCPcopy Create free account
hub / github.com/google/pprof / renderHTML

Function renderHTML

internal/driver/webui.go:285–294  ·  view source on GitHub ↗

renderHTML generates html using the named template based on the contents of data.

(dst io.Writer, tmpl string, rpt *report.Report, errList, legend []string, data webArgs)

Source from the content-addressed store, hash-verified

283
284// renderHTML generates html using the named template based on the contents of data.
285func renderHTML(dst io.Writer, tmpl string, rpt *report.Report, errList, legend []string, data webArgs) error {
286 file := getFromLegend(legend, "File: ", "unknown")
287 profile := getFromLegend(legend, "Type: ", "unknown")
288 data.Title = file + " " + profile
289 data.Errors = errList
290 data.Total = rpt.Total()
291 data.DocURL = rpt.DocURL()
292 data.Legend = legend
293 return getHTMLTemplates().ExecuteTemplate(dst, tmpl, data)
294}
295
296// render responds with html generated by passing data to the named template.
297func (ui *webInterface) render(w http.ResponseWriter, req *http.Request, tmpl string,

Callers 2

renderMethod · 0.85
printWebListFunction · 0.85

Calls 4

getFromLegendFunction · 0.85
getHTMLTemplatesFunction · 0.85
TotalMethod · 0.80
DocURLMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…