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

Method RemoveLabel

profile/profile.go:730–734  ·  view source on GitHub ↗

RemoveLabel removes all labels associated with the specified key for all samples in the profile.

(key string)

Source from the content-addressed store, hash-verified

728// RemoveLabel removes all labels associated with the specified key for all
729// samples in the profile.
730func (p *Profile) RemoveLabel(key string) {
731 for _, sample := range p.Sample {
732 delete(sample.Label, key)
733 }
734}
735
736// HasLabel returns true if a sample has a label with indicated key and value.
737func (s *Sample) HasLabel(key, value string) bool {

Callers 2

TestRemoveFunction · 0.80
newGraphMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestRemoveFunction · 0.64