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

Function BenchmarkCardinalityInsert

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

Source from the content-addressed store, hash-verified

208}
209
210func BenchmarkCardinalityInsert(b *testing.B) {
211 c := NewCardinality(15*time.Minute, 5*time.Minute)
212 b.ReportAllocs()
213
214 for i := 0; i < b.N; i++ {
215 c.Insert(uint64(i))
216 }
217}
218
219func BenchmarkCardinalityEstimate(b *testing.B) {
220 c := NewCardinality(15*time.Minute, 5*time.Minute)

Callers

nothing calls this directly

Calls 2

InsertMethod · 0.95
NewCardinalityFunction · 0.85

Tested by

no test coverage detected