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

Function greetings

internal/driver/interactive.go:128–140  ·  view source on GitHub ↗

For testing purposes. greetings prints a brief welcome and some overall profile information before accepting interactive commands.

(p *profile.Profile, ui plugin.UI)

Source from the content-addressed store, hash-verified

126// greetings prints a brief welcome and some overall profile
127// information before accepting interactive commands.
128func greetings(p *profile.Profile, ui plugin.UI) {
129 numLabelUnits := identifyNumLabelUnits(p, ui)
130 ropt, err := reportOptions(p, numLabelUnits, currentConfig())
131 if err == nil {
132 rpt := report.New(p, ropt)
133 ui.Print(strings.Join(report.ProfileLabels(rpt), "\n"))
134 if rpt.Total() == 0 && len(p.SampleType) > 1 {
135 ui.Print(`No samples were found with the default sample value type.`)
136 ui.Print(`Try "sample_index" command to analyze different sample values.`, "\n")
137 }
138 }
139 ui.Print(`Entering interactive mode (type "help" for commands, "o" for options)`)
140}
141
142// shortcuts represents composite commands that expand into a sequence
143// of other commands.

Callers 1

interactiveFunction · 0.85

Calls 7

NewFunction · 0.92
ProfileLabelsFunction · 0.92
identifyNumLabelUnitsFunction · 0.85
reportOptionsFunction · 0.85
currentConfigFunction · 0.85
TotalMethod · 0.80
PrintMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…