File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff 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 ) ]
2425struct 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
3034fn 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 )
You can’t perform that action at this time.
0 commit comments