matthewmturner commented on code in PR #8665:
URL: https://github.com/apache/arrow-datafusion/pull/8665#discussion_r1437897026


##########
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:
   Indeed, there are several ways we can go about this.  If there isnt an 
immediate need for per query benchmarks then i think aggregating could work and 
then we can add per query plans over time or as needed.
   
   Also, and probably not for this PR, it looks like criterion has some 
features that would allow you to establish a baseline benchmark 
(https://bheisler.github.io/criterion.rs/book/user_guide/command_line_options.html#baselines).
  I'm wondering if that could be useful for integrating into CI to ensure no 
regressions.



-- 
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]

Reply via email to