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

Method top

internal/driver/webui.go:365–382  ·  view source on GitHub ↗
(w http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

363}
364
365func (ui *webInterface) top(w http.ResponseWriter, req *http.Request) {
366 rpt, errList := ui.makeReport(w, req, []string{"top"}, func(cfg *config) {
367 cfg.NodeCount = 500
368 })
369 if rpt == nil {
370 return // error already reported
371 }
372 top, legend := report.TextItems(rpt)
373 var nodes []string
374 for _, item := range top {
375 nodes = append(nodes, item.Name)
376 }
377
378 ui.render(w, req, "top", rpt, errList, legend, webArgs{
379 Top: top,
380 Nodes: nodes,
381 })
382}
383
384// disasm generates a web page containing disassembly.
385func (ui *webInterface) disasm(w http.ResponseWriter, req *http.Request) {

Callers

nothing calls this directly

Calls 3

makeReportMethod · 0.95
renderMethod · 0.95
TextItemsFunction · 0.92

Tested by

no test coverage detected