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

Function profileShortcuts

internal/driver/interactive.go:161–171  ·  view source on GitHub ↗

profileShortcuts creates macros for convenience and backward compatibility.

(p *profile.Profile)

Source from the content-addressed store, hash-verified

159
160// profileShortcuts creates macros for convenience and backward compatibility.
161func profileShortcuts(p *profile.Profile) shortcuts {
162 s := pprofShortcuts
163 // Add shortcuts for sample types
164 for _, st := range p.SampleType {
165 command := fmt.Sprintf("sample_index=%s", st.Type)
166 s[st.Type] = []string{command}
167 s["total_"+st.Type] = []string{"mean=0", command}
168 s["mean_"+st.Type] = []string{"mean=1", command}
169 }
170 return s
171}
172
173func sampleTypes(p *profile.Profile) []string {
174 types := make([]string, len(p.SampleType))

Callers 1

interactiveFunction · 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…