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

Function BenchmarkFindUnknownTraceID

tempodb/wal/wal_test.go:456–468  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

454}
455
456func BenchmarkFindUnknownTraceID(b *testing.B) {
457 for _, enc := range encoding.AllEncodingsForWrites() {
458 version := enc.Version()
459 b.Run(version, func(b *testing.B) {
460 runWALBenchmark(b, version, 1, func(_ [][]byte, _ []*tempopb.Trace, block common.WALBlock) {
461 for i := 0; i < b.N; i++ {
462 _, err := block.FindTraceByID(context.Background(), common.ID{}, common.DefaultSearchOptions())
463 require.NoError(b, err)
464 }
465 })
466 })
467 }
468}
469
470func BenchmarkSearch(b *testing.B) {
471 for _, enc := range encoding.AllEncodingsForWrites() {

Callers

nothing calls this directly

Calls 6

AllEncodingsForWritesFunction · 0.92
DefaultSearchOptionsFunction · 0.92
runWALBenchmarkFunction · 0.85
VersionMethod · 0.65
FindTraceByIDMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected