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

Function getFromLegend

internal/driver/webui.go:473–480  ·  view source on GitHub ↗

getFromLegend returns the suffix of an entry in legend that starts with param. It returns def if no such entry is found.

(legend []string, param, def string)

Source from the content-addressed store, hash-verified

471// getFromLegend returns the suffix of an entry in legend that starts
472// with param. It returns def if no such entry is found.
473func getFromLegend(legend []string, param, def string) string {
474 for _, s := range legend {
475 if strings.HasPrefix(s, param) {
476 return s[len(param):]
477 }
478 }
479 return def
480}

Callers 1

renderHTMLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…