alamb commented on code in PR #7060:
URL: https://github.com/apache/arrow-datafusion/pull/7060#discussion_r1273447202
##########
benchmarks/src/tpch/run.rs:
##########
@@ -42,8 +42,17 @@ use structopt::StructOpt;
use super::{get_tbl_tpch_table_schema, get_tpch_table_schema, TPCH_TABLES};
-/// Run the tpch benchmark
+/// Run the tpch benchmark.
+///
+/// This benchmarks is derived from the [TPC-H][1] version
Review Comment:
I moved the details of what the benchmark was doing into the binary from the
README, which I think is better as it is closer to the code, but I don't feel
strongly about this and would welcome other opinions on the matter
##########
benchmarks/src/lib.rs:
##########
@@ -16,27 +16,10 @@
// under the License.
//! DataFusion benchmark runner
-use datafusion::error::Result;
-use structopt::StructOpt;
-
-pub mod run;
+pub mod clickbench;
pub mod tpch;
+mod options;
+mod run;
+pub use options::CommonOpt;
pub use run::{BenchQuery, BenchmarkRun};
-
Review Comment:
this was dead code I accidentally introduced in
https://github.com/apache/arrow-datafusion/pull/7054
The actual entrypoint for the dfbench binary is in
https://github.com/apache/arrow-datafusion/blob/main/benchmarks/src/bin/dfbench.rs
##########
benchmarks/src/tpch/run.rs:
##########
@@ -53,17 +62,9 @@ pub struct RunOpt {
#[structopt(short, long)]
debug: bool,
- /// Number of iterations of each test run
Review Comment:
This is the first part of a payment to reduce duplication in the benchmark
runners (e.g. part of #7052)
##########
benchmarks/src/options.rs:
##########
@@ -0,0 +1,53 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use datafusion::prelude::SessionConfig;
+use structopt::StructOpt;
+
+// Common benchmark options (don't use doc comments otherwise this doc
+// shows up in help files)
+#[derive(Debug, StructOpt, Clone)]
Review Comment:
refactored common options into `CommonOpt`
--
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]