HasLabel returns true if a sample has a label with indicated key and value.
(key, value string)
| 735 | |
| 736 | // HasLabel returns true if a sample has a label with indicated key and value. |
| 737 | func (s *Sample) HasLabel(key, value string) bool { |
| 738 | return slices.Contains(s.Label[key], value) |
| 739 | } |
| 740 | |
| 741 | // SetNumLabel sets the specified key to the specified value for all samples in the |
| 742 | // profile. "unit" is a slice that describes the units that each corresponding member |
no outgoing calls