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

Function newExemplarBucketSet

pkg/traceql/util.go:56–65  ·  view source on GitHub ↗

newExemplarBucketSet creates a new bucket set for the aligned time range start and end are in nanoseconds. If the range is instant, empty bucket set is returned.

(exemplars uint32, start, end, step uint64, instant bool)

Source from the content-addressed store, hash-verified

54// start and end are in nanoseconds.
55// If the range is instant, empty bucket set is returned.
56func newExemplarBucketSet(exemplars uint32, start, end, step uint64, instant bool) bucketSet {
57 if instant {
58 return &alwaysFullBucketSet{}
59 }
60
61 start = alignStart(start, end, step, instant)
62 end = alignEnd(start, end, step, instant)
63
64 return newBucketSet(exemplars, start, end)
65}
66
67type alwaysFullBucketSet struct{}
68

Callers 7

NewBaselineAggregatorFunction · 0.85
TestBucketSet_InstantFunction · 0.85
initMethod · 0.85
getSeriesMethod · 0.85
NewStepAggregatorFunction · 0.85
NewSimpleCombinerFunction · 0.85
NewHistogramAggregatorFunction · 0.85

Calls 3

alignStartFunction · 0.85
alignEndFunction · 0.85
newBucketSetFunction · 0.85

Tested by 1

TestBucketSet_InstantFunction · 0.68