matthewmturner commented on code in PR #8665:
URL: https://github.com/apache/arrow-datafusion/pull/8665#discussion_r1437914951
##########
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:
There is also the option of using
[benchmark_group](https://docs.rs/criterion/latest/criterion/struct.Criterion.html#method.benchmark_group)
which allows you to group function benchmarks in final output.
--
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]