identifyNumLabelUnits returns a map of numeric label keys to the units associated with those keys.
(p *profile.Profile, ui plugin.UI)
| 351 | // identifyNumLabelUnits returns a map of numeric label keys to the units |
| 352 | // associated with those keys. |
| 353 | func 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 | |
| 364 | type sampleValueFunc func([]int64) int64 |
| 365 |
searching dependent graphs…