Skip to content

Commit 6f7f7a3

Browse files
committed
fix benchmark build fail #664, add the argument '--driver_port'
Signed-off-by: DogDu <[email protected]>
1 parent 92c390f commit 6f7f7a3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

benchmark/src/main.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,19 @@ const LOG_FILE: &str = "GRPCIO_BENCHMARK_LOG_FILE";
2121
///
2222
/// ref http://www.grpc.io/docs/guides/benchmarking.html.
2323
#[derive(Parser)]
24+
#[group(required = true, multiple = false)]
2425
struct WorkerCli {
2526
/// The port the worker should listen on. For example, 8080
26-
#[arg(long)]
27-
driver_port: Option<u16>,
27+
#[arg(id = "driver_port", long)]
28+
driver_port0: Option<u16>,
29+
/// The port the worker should listen on. For example, 8080
30+
#[arg(id = "driver-port", long)]
31+
driver_port1: Option<u16>,
2832
}
2933

3034
fn main() {
3135
let cli = WorkerCli::parse();
32-
let port = cli.driver_port.unwrap_or(8080);
36+
let port = cli.driver_port0.unwrap_or(cli.driver_port1.unwrap_or(32766));
3337

3438
let _log_guard = init_log(
3539
env::var(LOG_FILE)

0 commit comments

Comments
 (0)