(b *testing.B)
| 517 | } |
| 518 | |
| 519 | func BenchmarkWalTraceQL(b *testing.B) { |
| 520 | reqs := []string{ |
| 521 | "{ .foo = `bar` }", |
| 522 | "{ span.foo = `bar` }", |
| 523 | "{ resource.foo = `bar` }", |
| 524 | } |
| 525 | |
| 526 | w, warn, err := openWALBlock("15eec7d7-4b9f-4cf7-948d-fb9765ecd9a8+1+vParquet4", "/Users/marty/src/tmp/wal/", 0, 0) |
| 527 | require.NoError(b, err) |
| 528 | require.NoError(b, warn) |
| 529 | |
| 530 | for _, q := range reqs { |
| 531 | req := traceql.MustExtractFetchSpansRequestWithMetadata(q) |
| 532 | b.Run(q, func(b *testing.B) { |
| 533 | for i := 0; i < b.N; i++ { |
| 534 | resp, err := w.Fetch(context.TODO(), req, common.DefaultSearchOptions()) |
| 535 | require.NoError(b, err) |
| 536 | |
| 537 | for { |
| 538 | ss, err := resp.Results.Next(context.TODO()) |
| 539 | require.NoError(b, err) |
| 540 | if ss == nil { |
| 541 | break |
| 542 | } |
| 543 | } |
| 544 | } |
| 545 | }) |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | func BenchmarkWalSearchTagValues(b *testing.B) { |
| 550 | tags := []string{ |
nothing calls this directly
no test coverage detected