(b *testing.B)
| 436 | } |
| 437 | |
| 438 | func BenchmarkFindTraceByID(b *testing.B) { |
| 439 | for _, enc := range encoding.AllEncodingsForWrites() { |
| 440 | version := enc.Version() |
| 441 | b.Run(version, func(b *testing.B) { |
| 442 | runWALBenchmark(b, version, 1, func(ids [][]byte, objs []*tempopb.Trace, block common.WALBlock) { |
| 443 | ctx := context.Background() |
| 444 | for i := 0; i < b.N; i++ { |
| 445 | j := i % len(ids) |
| 446 | |
| 447 | obj, err := block.FindTraceByID(ctx, ids[j], common.DefaultSearchOptions()) |
| 448 | require.NoError(b, err) |
| 449 | require.Equal(b, objs[j], obj) |
| 450 | } |
| 451 | }) |
| 452 | }) |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | func BenchmarkFindUnknownTraceID(b *testing.B) { |
| 457 | for _, enc := range encoding.AllEncodingsForWrites() { |
nothing calls this directly
no test coverage detected