MCPcopy
hub / github.com/grafana/tempo / sortAttrs

Function sortAttrs

tempodb/encoding/vparquet5/block_traceql_test.go:1491–1501  ·  view source on GitHub ↗
(attrs []attrVal)

Source from the content-addressed store, hash-verified

1489}
1490
1491func sortAttrs(attrs []attrVal) {
1492 sort.SliceStable(attrs, func(i, j int) bool {
1493 is := attrs[i].a.String()
1494 js := attrs[j].a.String()
1495 if is == js {
1496 // Compare by value
1497 return attrs[i].s.String() < attrs[j].s.String()
1498 }
1499 return is < js
1500 })
1501}
1502
1503func trimArrayAttrs(in []Attribute) []Attribute {
1504 out := []Attribute{}

Callers 3

flattenForSelectAllFunction · 0.70

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected