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

Function identifyNumLabelUnits

internal/driver/driver.go:353–362  ·  view source on GitHub ↗

identifyNumLabelUnits returns a map of numeric label keys to the units associated with those keys.

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

Source from the content-addressed store, hash-verified

351// identifyNumLabelUnits returns a map of numeric label keys to the units
352// associated with those keys.
353func identifyNumLabelUnits(p *profile.Profile, ui plugin.UI) map[string]string {
354 numLabelUnits, ignoredUnits := p.NumLabelUnits()
355
356 // Print errors for tags with multiple units associated with
357 // a single key.
358 for k, units := range ignoredUnits {
359 ui.PrintErr(fmt.Sprintf("For tag %s used unit %s, also encountered unit(s) %s", k, numLabelUnits[k], strings.Join(units, ", ")))
360 }
361 return numLabelUnits
362}
363
364type sampleValueFunc func([]int64) int64
365

Callers 3

generateRawReportFunction · 0.85
greetingsFunction · 0.85

Calls 2

NumLabelUnitsMethod · 0.80
PrintErrMethod · 0.65

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…