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

Method Less

internal/graph/graph.go:1161–1176  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

1159}
1160
1161func (el edgeList) Less(i, j int) bool {
1162 if el[i].Weight != el[j].Weight {
1163 return abs64(el[i].Weight) > abs64(el[j].Weight)
1164 }
1165
1166 from1 := el[i].Src.Info.PrintableName()
1167 from2 := el[j].Src.Info.PrintableName()
1168 if from1 != from2 {
1169 return from1 < from2
1170 }
1171
1172 to1 := el[i].Dest.Info.PrintableName()
1173 to2 := el[j].Dest.Info.PrintableName()
1174
1175 return to1 < to2
1176}
1177
1178func (el edgeList) Swap(i, j int) {
1179 el[i], el[j] = el[j], el[i]

Callers

nothing calls this directly

Calls 2

PrintableNameMethod · 0.80
abs64Function · 0.70

Tested by

no test coverage detected