(t *testing.T, tempDir string, tenantID string, blockCount int, traceCount int)
| 62 | } |
| 63 | |
| 64 | func generateTestBlocks(t *testing.T, tempDir string, tenantID string, blockCount int, traceCount int) { |
| 65 | t.Helper() |
| 66 | |
| 67 | rawR, rawW, _, err := local.New(&local.Config{ |
| 68 | Path: tempDir, |
| 69 | }) |
| 70 | require.NoError(t, err) |
| 71 | |
| 72 | r := backend.NewReader(rawR) |
| 73 | w := backend.NewWriter(rawW) |
| 74 | ctx := context.Background() |
| 75 | |
| 76 | cfg := &common.BlockConfig{ |
| 77 | BloomFP: 0.01, |
| 78 | BloomShardSizeBytes: 100 * 1024, |
| 79 | } |
| 80 | |
| 81 | for bn := 0; bn < blockCount; bn++ { |
| 82 | traces := newTestTraces(traceCount) |
| 83 | iter := &testIterator{traces: traces} |
| 84 | meta := backend.NewBlockMeta(tenantID, uuid.New(), vparquet4.VersionString) |
| 85 | meta.TotalObjects = int64(len(iter.traces)) |
| 86 | _, err := vparquet4.CreateBlock(ctx, cfg, meta, iter, r, w) |
| 87 | require.NoError(t, err) |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | func getAllTraceIDs(t *testing.T, dir string, tenant string) []string { |
| 92 | t.Helper() |
no test coverage detected