diff --git a/benchmarks/src/options.rs b/benchmarks/src/options.rs index 41403ab7163a2..d285741e230af 100644 --- a/benchmarks/src/options.rs +++ b/benchmarks/src/options.rs @@ -24,15 +24,15 @@ use structopt::StructOpt; pub struct CommonOpt { /// Number of iterations of each test run #[structopt(short = "i", long = "iterations", default_value = "3")] - iterations: usize, + pub iterations: usize, /// Number of partitions to process in parallel #[structopt(short = "n", long = "partitions", default_value = "2")] - partitions: usize, + pub partitions: usize, /// Batch size when reading CSV or Parquet files #[structopt(short = "s", long = "batch-size", default_value = "8192")] - batch_size: usize, + pub batch_size: usize, } impl CommonOpt { diff --git a/benchmarks/src/tpch/run.rs b/benchmarks/src/tpch/run.rs index fb496ddc7c83c..5b43f2b93fdc8 100644 --- a/benchmarks/src/tpch/run.rs +++ b/benchmarks/src/tpch/run.rs @@ -327,12 +327,15 @@ mod tests { async fn round_trip_logical_plan(query: usize) -> Result<()> { let ctx = SessionContext::default(); let path = get_tpch_data_path()?; - let opt = RunOpt { - query: Some(query), - debug: false, + let common = CommonOpt { iterations: 1, partitions: 2, batch_size: 8192, + }; + let opt = RunOpt { + query: Some(query), + debug: false, + common, path: PathBuf::from(path.to_string()), file_format: "tbl".to_string(), mem_table: false, @@ -356,12 +359,15 @@ mod tests { async fn round_trip_physical_plan(query: usize) -> Result<()> { let ctx = SessionContext::default(); let path = get_tpch_data_path()?; - let opt = RunOpt { - query: Some(query), - debug: false, + let common = CommonOpt { iterations: 1, partitions: 2, batch_size: 8192, + }; + let opt = RunOpt { + query: Some(query), + debug: false, + common, path: PathBuf::from(path.to_string()), file_format: "tbl".to_string(), mem_table: false,