Skip to content

Commit 94fd86a

Browse files
authored
Add topk_tpch benchmark (#16410)
* Add topk benchmark * Add topk benchmark * Add topk benchmark
1 parent 5a2933e commit 94fd86a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

benchmarks/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,15 @@ See [`sort_tpch.rs`](src/sort_tpch.rs) for more details.
510510
./bench.sh run sort_tpch
511511
```
512512

513+
### TopK TPCH
514+
515+
In addition, topk_tpch is available from the bench.sh script:
516+
517+
```bash
518+
./bench.sh run topk_tpch
519+
```
520+
521+
513522
## IMDB
514523

515524
Run Join Order Benchmark (JOB) on IMDB dataset.

benchmarks/bench.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ main() {
236236
# same data as for tpch
237237
data_tpch "1"
238238
;;
239+
topk_tpch)
240+
# same data as for tpch
241+
data_tpch "1"
242+
;;
239243
*)
240244
echo "Error: unknown benchmark '$BENCHMARK' for data generation"
241245
usage
@@ -361,6 +365,9 @@ main() {
361365
sort_tpch)
362366
run_sort_tpch
363367
;;
368+
topk_tpch)
369+
run_topk_tpch
370+
;;
364371
*)
365372
echo "Error: unknown benchmark '$BENCHMARK' for run"
366373
usage
@@ -981,6 +988,16 @@ run_sort_tpch() {
981988
debug_run $CARGO_COMMAND --bin dfbench -- sort-tpch --iterations 5 --path "${TPCH_DIR}" -o "${RESULTS_FILE}"
982989
}
983990

991+
# Runs the sort tpch integration benchmark with limit 100 (topk)
992+
run_topk_tpch() {
993+
TPCH_DIR="${DATA_DIR}/tpch_sf1"
994+
RESULTS_FILE="${RESULTS_DIR}/run_topk_tpch.json"
995+
echo "RESULTS_FILE: ${RESULTS_FILE}"
996+
echo "Running topk tpch benchmark..."
997+
998+
$CARGO_COMMAND --bin dfbench -- sort-tpch --iterations 5 --path "${TPCH_DIR}" -o "${RESULTS_FILE}" --limit 100
999+
}
1000+
9841001

9851002
compare_benchmarks() {
9861003
BASE_RESULTS_DIR="${SCRIPT_DIR}/results"

0 commit comments

Comments
 (0)