-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add support for running sql benchmarks with command line arguments #23772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| description = "ClickBench analytics queries over the hits dataset" | ||
|
|
||
| query_pattern = "q{QUERY_ID_PADDED}.benchmark" | ||
|
|
||
| [path_replacements] | ||
| DATA_DIR = "../../data" | ||
|
|
||
| [[options]] | ||
| name = "partitioning" | ||
| env = "CLICKBENCH_TYPE" | ||
| default = "single" | ||
| values = ["single", "partitioned"] | ||
| help = "Selects the single-file or partitioned ClickBench dataset." | ||
|
|
||
| [[examples]] | ||
| command = "cargo run --release --bin benchmark_runner -- clickbench" | ||
| description = "Run all ClickBench queries against the single-file dataset." | ||
|
|
||
| [[examples]] | ||
| command = "cargo run --release --bin benchmark_runner -- clickbench --query 7" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried it like cargo run -p datafusion-benchmarks --release --bin benchmark_runner -- clickbench --query 7(venv) andrewlamb@Andrews-MacBook-Pro-3:/tmp/runner$ cargo run -p datafusion-benchmarks --release --bin benchmark_runner -- clickbench --query 7
Finished `release` profile [optimized] target(s) in 0.24s
Running `target/release/benchmark_runner clickbench --query 7`
clickbench/Q07 iteration 0: 146.3 ms, 18 rows
clickbench/Q07 iteration 1: 28.0 ms, 18 rows
clickbench/Q07 iteration 2: 22.9 ms, 18 rowsIt was also sweet to be able to do cargo run -p datafusion-benchmarks --release --bin benchmark_runner -- clickbench --query 7 --iterations=100And have it do (venv) andrewlamb@Andrews-MacBook-Pro-3:/tmp/runner$ cargo run -p datafusion-benchmarks --release --bin benchmark_runner -- clickbench --query 7 --iterations=100
Finished `release` profile [optimized] target(s) in 0.21s
Running `target/release/benchmark_runner clickbench --query 7 --iterations=100`
clickbench/Q07 iteration 0: 37.4 ms, 18 rows
clickbench/Q07 iteration 1: 28.1 ms, 18 rows
...
clickbench/Q07 iteration 96: 29.0 ms, 18 rows
clickbench/Q07 iteration 97: 26.2 ms, 18 rows
clickbench/Q07 iteration 98: 29.2 ms, 18 rows
clickbench/Q07 iteration 99: 26.4 ms, 18 rows |
||
| description = "Run ClickBench query 7." | ||
|
|
||
| [[examples]] | ||
| command = "cargo run --release --bin benchmark_runner -- clickbench --partitioning partitioned" | ||
| description = "Run all ClickBench queries against the partitioned dataset." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| description = "Extended ClickBench queries over the hits dataset" | ||
|
|
||
| query_pattern = "q{QUERY_ID_PADDED}.benchmark" | ||
|
|
||
| [path_replacements] | ||
| DATA_DIR = "../../data" | ||
|
|
||
| [[options]] | ||
| name = "partitioning" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is pretty neat -- so I can do You can easily see the diiffernc (venv) andrewlamb@Andrews-MacBook-Pro-3:/tmp/runner$ cargo run -p datafusion-benchmarks --release --bin benchmark_runner -- clickbench_extended --iterations=1
Finished `release` profile [optimized] target(s) in 0.40s
Running `target/release/benchmark_runner clickbench_extended --iterations=1`
clickbench_extended/Q00/single iteration 0: 616.4 ms, 1 rows
clickbench_extended/Q01/single iteration 0: 120.4 ms, 1 rows
clickbench_extended/Q02/single iteration 0: 263.7 ms, 10 rows
clickbench_extended/Q03/single iteration 0: 243.9 ms, 10 rows
clickbench_extended/Q04/single iteration 0: 1247.9 ms, 2 rows
clickbench_extended/Q05/single iteration 0: 9762.0 ms, 2 rows
clickbench_extended/Q06/single iteration 0: 11.7 ms, 1 rows
clickbench_extended/Q07/single iteration 0: 520.7 ms, 10 rows
clickbench_extended/Q08/single iteration 0: 294.6 ms, 10 rows
clickbench_extended/Q09/single iteration 0: 1907.5 ms, 1 rows
clickbench_extended/Q10/single iteration 0: 576.0 ms, 1 rows
clickbench_extended/Q11/single iteration 0: 1140.2 ms, 1 rows
clickbench_extended/Q12/single iteration 0: 129.8 ms, 1 rowsAnd |
||
| env = "CLICKBENCH_TYPE" | ||
| default = "single" | ||
| values = ["single", "partitioned"] | ||
| help = "Selects the single-file or partitioned ClickBench dataset." | ||
|
|
||
| [[examples]] | ||
| command = "cargo run --release --bin benchmark_runner -- clickbench_extended" | ||
| description = "Run all extended ClickBench queries against the single-file dataset." | ||
|
|
||
| [[examples]] | ||
| command = "cargo run --release --bin benchmark_runner -- clickbench_extended --query 4 --partitioning partitioned" | ||
| description = "Run extended ClickBench query 4 against the partitioned dataset." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| description = "ClickBench query over a pre-sorted hits dataset" | ||
|
|
||
| query_pattern = "q{QUERY_ID_PADDED}.benchmark" | ||
|
|
||
| [path_replacements] | ||
| DATA_DIR = "../../data" | ||
|
|
||
| [[options]] | ||
| name = "sort-column" | ||
| env = "SORTED_BY" | ||
| default = "EventTime" | ||
| values = ["EventTime", "..."] | ||
| help = "Selects the column used to sort the ClickBench data." | ||
|
|
||
| [[options]] | ||
| name = "sort-order" | ||
| env = "SORTED_ORDER" | ||
| default = "ASC" | ||
| values = ["ASC", "DESC"] | ||
| help = "Selects the sort direction for the ClickBench data." | ||
|
|
||
| [[examples]] | ||
| command = "cargo run --release --bin benchmark_runner -- clickbench_sorted" | ||
| description = "Run the sorted ClickBench query ordered by EventTime ascending." | ||
|
|
||
| [[examples]] | ||
| command = "cargo run --release --bin benchmark_runner -- clickbench_sorted --sort-column UserID --sort-order DESC" | ||
| description = "Run the query over data sorted by UserID descending." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is really cool
(venv) andrewlamb@Andrews-MacBook-Pro-3:/tmp/runner$ cargo run -p datafusion-benchmarks --profile=profiling --bin benchmark_runner -- h2o --size=medium --subgroup=groupby
Finished
profilingprofile [optimized + debuginfo] target(s) in 0.16sRunning
target/profiling/benchmark_runner h2o --size=medium --subgroup=groupbyLoading medium groupby csv h2o data
h2o/Q01/groupby iteration 0: 895.4 ms, 100 rows
h2o/Q01/groupby iteration 1: 886.0 ms, 100 rows
h2o/Q01/groupby iteration 2: 884.8 ms, 100 rows
Loading medium groupby csv h2o data