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

Function locationHash

profile/profile_test.go:1074–1082  ·  view source on GitHub ↗

locationHash constructs a string to use as a hashkey for a sample, based on its locations

(s *Sample)

Source from the content-addressed store, hash-verified

1072
1073// locationHash constructs a string to use as a hashkey for a sample, based on its locations
1074func locationHash(s *Sample) string {
1075 var tb string
1076 for _, l := range s.Location {
1077 for _, ln := range l.Line {
1078 tb = tb + fmt.Sprintf("%s:%d:%d@%d ", ln.Function.Name, ln.Line, ln.Column, l.Address)
1079 }
1080 }
1081 return tb
1082}
1083
1084func TestHasLabel(t *testing.T) {
1085 var testcases = []struct {

Callers 4

checkAggregationFunction · 0.85
TestMergeFunction · 0.85
TestMergeAllFunction · 0.85
TestEmptyMappingMergeFunction · 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…