tustvold commented on code in PR #2226:
URL: https://github.com/apache/arrow-datafusion/pull/2226#discussion_r849777965


##########
datafusion/scheduler/benches/parquet_query_sql.rs:
##########
@@ -220,17 +230,42 @@ fn criterion_benchmark(c: &mut Criterion) {
             continue;
         }
 
-        let query = query.as_str();
-        c.bench_function(query, |b| {
+        c.bench_function(&format!("tokio: {}", query), |b| {
             b.iter(|| {
-                let context = context.clone();
-                rt.block_on(async move {
-                    let query = context.sql(query).await.unwrap();
+                let query = query.clone();
+                let mut context = context.clone();
+                let (sender, mut receiver) = 
futures::channel::mpsc::unbounded();
+
+                // Spawn work to a separate tokio thread pool

Review Comment:
   This makes the performance comparison more fair, as the dispatch to another 
thread pool is necessary in both approaches, as you don't want to run 
long-running query workloads on the same tokio pool as say network IO, and can 
have a non-negligible impact on the simpler queries.



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