milenkovicm commented on code in PR #1641:
URL:
https://github.com/apache/datafusion-ballista/pull/1641#discussion_r3174650619
##########
benchmarks/src/bin/tpch.rs:
##########
@@ -354,34 +355,37 @@ async fn benchmark_datafusion(opt:
DataFusionBenchmarkOpt) -> Result<Vec<RecordB
let df = ctx.sql(sql).await?;
result = df.collect().await?;
}
- let elapsed = start.elapsed().as_secs_f64() * 1000.0;
+ let elapsed = start.elapsed().as_secs_f64();
if opt.debug {
pretty::print_batches(&result)?;
}
- millis.push(elapsed);
+ secs.push(elapsed);
let row_count = result.iter().map(|b| b.num_rows()).sum();
if opt.iterations == 1 {
println!(
- "Query {} took {:.1} ms and returned {} rows",
+ "Query {} took {:.3} s and returned {} rows",
query, elapsed, row_count
);
} else {
println!(
- "Query {} iteration {} took {:.1} ms and returned {} rows",
+ "Query {} iteration {} took {:.3} s and returned {} rows",
query, i, elapsed, row_count
);
}
query_run.add_result(elapsed, row_count);
}
if opt.iterations > 1 {
- let avg = millis.iter().sum::<f64>() / millis.len() as f64;
- println!("Query {} avg time: {:.1} ms", query, avg);
+ let avg = secs.iter().sum::<f64>() / secs.len() as f64;
+ println!("Query {} avg time: {:.3} s", query, avg);
}
benchmark_run.add_query_run(query_run);
}
+ let total_elapsed = total_start.elapsed().as_secs_f64();
Review Comment:
Should this print total benchmark running time or total query running time.
If later is the case then it should be sum of all query times or sum of all
average query times if there is more than one iteration per query
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]