Repository navigation
Commit 88fb94d
Add sorted TopK TPC-H benchmark target (#23003)
## Which issue does this PR close?
This PR adds a first-class benchmark target for an existing `sort-tpch`
mode.
## Rationale for this change
`dfbench sort-tpch` already supports TopK queries over input declared as
sorted with `--sorted --limit`, but `bench.sh` only exposed the unsorted
TopK wrapper as `topk_tpch`.
That made the sorted TopK path harder to run from the benchmark bot and
easier to miss during performance work. Adding `topk_sorted_tpch` gives
a named target for the sorted-input TopK case:
```bash
./benchmarks/bench.sh run topk_sorted_tpch
```
The new target uses `--limit 100` so it is the sorted counterpart to the
existing `topk_tpch` benchmark.
## What changes are included in this PR?
- Adds `topk_sorted_tpch` to the benchmark script help text.
- Reuses the existing TPC-H SF1 parquet data setup.
- Adds a `run_topk_sorted_tpch` wrapper around `dfbench sort-tpch
--sorted --limit 100`.
- Writes results to `run_topk_sorted_tpch.json`.
- Documents the new benchmark target in `benchmarks/README.md`.
## Are these changes tested?
Validated with:
```bash
bash -n benchmarks/bench.sh
CARGO_COMMAND=echo DATA_DIR=/tmp/df-topk-bench-data RESULTS_NAME=topk_sorted_tpch_smoke ./benchmarks/bench.sh run topk_sorted_tpch
git diff --check
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
```
The smoke run verified that the script dispatches to:
```bash
dfbench sort-tpch --iterations 5 --path ... --sorted --limit 100
```
## Are there any user-facing changes?
No engine or API behavior changes. This only adds a new opt-in benchmark
target.
---------
Co-authored-by: Gabriel <[email protected]>1 parent 62b3b62 commit 88fb94d
3 files changed
Lines changed: 35 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
562 | 570 | | |
563 | 571 | | |
564 | 572 | | |
| |||
578 | 586 | | |
579 | 587 | | |
580 | 588 | | |
581 | | - | |
| 589 | + | |
582 | 590 | | |
583 | 591 | | |
584 | 592 | | |
| |||
598 | 606 | | |
599 | 607 | | |
600 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
601 | 617 | | |
602 | 618 | | |
603 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
349 | | - | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| |||
577 | 578 | | |
578 | 579 | | |
579 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
580 | 584 | | |
581 | 585 | | |
582 | 586 | | |
| |||
1506 | 1510 | | |
1507 | 1511 | | |
1508 | 1512 | | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
1509 | 1523 | | |
1510 | 1524 | | |
1511 | 1525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
0 commit comments