alamb commented on code in PR #8665:
URL: https://github.com/apache/arrow-datafusion/pull/8665#discussion_r1437870278
##########
datafusion/core/benches/sql_planner.rs:
##########
@@ -115,6 +163,16 @@ fn criterion_benchmark(c: &mut Criterion) {
)
})
});
+
+ let q1_sql =
std::fs::read_to_string("../../benchmarks/queries/q1.sql").unwrap();
+ c.bench_function("physical_plan_tpch_q1", |b| {
+ b.iter(|| physical_plan(&ctx, &q1_sql))
+ });
+
+ let q12_sql =
std::fs::read_to_string("../../benchmarks/queries/q12.sql").unwrap();
+ c.bench_function("physical_plan_tpch_q12", |b| {
+ b.iter(|| physical_plan(&ctx, &q12_sql))
+ });
Review Comment:
What do you think about having a benchmark like this that planned them all
in a single go. Something like
```rust
let q1_sql =
std::fs::read_to_string("../../benchmarks/queries/q1.sql").unwrap();
let q12_sql =
std::fs::read_to_string("../../benchmarks/queries/q12.sql").unwrap();
c.bench_function("physical_plan_tpch", |b| {
b.iter(|| physical_plan(&ctx, &q1_sql))
b.iter(|| physical_plan(&ctx, &q12_sql))
});
```
And we can add per-query benchmarks if needed / desired?
I am personally torn between per-query benchmarks which would provide more
detail, but require more aggregation to summarize and this single number, with
less specificity
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]