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

Function BenchmarkCardinalityAdvance

modules/generator/registry/cardinality_test.go:233–245  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

231}
232
233func BenchmarkCardinalityAdvance(b *testing.B) {
234 c := NewCardinality(15*time.Minute, 5*time.Minute)
235 for i := 0; i < c.sketchesLength*64; i++ {
236 c.Insert(uint64(i))
237 }
238
239 b.ReportAllocs()
240 b.ResetTimer()
241
242 for i := 0; i < b.N; i++ {
243 c.Advance()
244 }
245}

Callers

nothing calls this directly

Calls 3

InsertMethod · 0.95
AdvanceMethod · 0.95
NewCardinalityFunction · 0.85

Tested by

no test coverage detected