Skip to content

Commit ea71acf

Browse files
authored
Minor: Log TPCH benchmark results (apache#6813)
1 parent d526a2e commit ea71acf

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

benchmarks/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ arrow = { workspace = true }
3737
datafusion = { path = "../datafusion/core", version = "27.0.0" }
3838
env_logger = "0.10"
3939
futures = "0.3"
40+
log = "^0.4"
4041
mimalloc = { version = "0.1", optional = true, default-features = false }
4142
num_cpus = "1.13.0"
4243
parquet = { workspace = true }

benchmarks/src/bin/tpch.rs

+3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
// under the License.
1717

1818
//! Benchmark derived from TPC-H. This is not an official TPC-H benchmark.
19+
use log::info;
1920

21+
use arrow::util::pretty::pretty_format_batches;
2022
use datafusion::datasource::file_format::{csv::CsvFormat, FileFormat};
2123
use datafusion::datasource::{MemTable, TableProvider};
2224
use datafusion::error::{DataFusionError, Result};
@@ -235,6 +237,7 @@ async fn benchmark_query(
235237
let elapsed = start.elapsed(); //.as_secs_f64() * 1000.0;
236238
let ms = elapsed.as_secs_f64() * 1000.0;
237239
millis.push(ms);
240+
info!("output:\n\n{}\n\n", pretty_format_batches(&result)?);
238241
let row_count = result.iter().map(|b| b.num_rows()).sum();
239242
println!(
240243
"Query {query_id} iteration {i} took {ms:.1} ms and returned {row_count} rows"

0 commit comments

Comments
 (0)