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

Function TestBucketSetSingleExemplar

pkg/traceql/util_test.go:112–117  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

110}
111
112func TestBucketSetSingleExemplar(t *testing.T) {
113 s := newBucketSet(1, uint64(100*time.Second.Nanoseconds()), uint64(199*time.Second.Nanoseconds())) //nolint: gosec // G115
114 tsMilli := uint64(100 * time.Second.Milliseconds()) //nolint: gosec // G115
115 assert.False(t, s.addAndTest(tsMilli), "ts=%d should be added to bucket", 100)
116 assert.True(t, s.addAndTest(tsMilli), "ts=%d should not be added to bucket", 100)
117}
118
119func TestBucketSetLargeExemplarsShortRange(t *testing.T) {
120 // exemplars=10000 → buckets=5000, but the range is only 1 second (1000ms interval).

Callers

nothing calls this directly

Calls 2

newBucketSetFunction · 0.85
addAndTestMethod · 0.65

Tested by

no test coverage detected