You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2023/03/21 15:30:12 UTC

[GitHub] [arrow-datafusion] comphead commented on a diff in pull request #5658: Add -o option to all e2e benches

comphead commented on code in PR #5658:
URL: https://github.com/apache/arrow-datafusion/pull/5658#discussion_r1143576034


##########
benchmarks/src/bin/h2o.rs:
##########
@@ -113,13 +118,16 @@ async fn group_by(opt: &GroupBy) -> Result<()> {
     let start = Instant::now();
     let df = ctx.sql(sql).await?;
     let batches = df.collect().await?;
-    let elapsed = start.elapsed().as_millis();
-
+    let elapsed = start.elapsed().as_secs_f64() * 1000.0;
+    let numrows = batches.iter().map(|b| b.num_rows()).sum::<usize>();

Review Comment:
   Thanks @jaylmiller for looking into this. 
   
   Noticed for other testcases you calc numrows before elapsed, perhaps to prevent numrows runtime to be part of benchmark  runtime



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org