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

Function compareSpans

pkg/model/trace/sort.go:87–94  ·  view source on GitHub ↗
(a, b *v1.Span)

Source from the content-addressed store, hash-verified

85}
86
87func compareSpans(a, b *v1.Span) bool {
88 // Sort by start time, then id
89 if a.StartTimeUnixNano == b.StartTimeUnixNano {
90 return bytes.Compare(a.SpanId, b.SpanId) == -1
91 }
92
93 return a.StartTimeUnixNano < b.StartTimeUnixNano
94}
95
96func compareEvents(a, b *v1.Span_Event) bool {
97 if a.TimeUnixNano == b.TimeUnixNano {

Callers 2

SortTraceFunction · 0.70
compareScopeSpansFunction · 0.70

Calls 1

CompareMethod · 0.45

Tested by

no test coverage detected