From 3f835f8ee3231d1ecc1f585f010bc9eaab347c74 Mon Sep 17 00:00:00 2001 From: Sathish <44555499+sambley@users.noreply.github.com> Date: Fri, 14 Dec 2018 21:18:41 -0800 Subject: [PATCH] Use proper match condition for duration (#2182) --- bench-tps/src/cli.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bench-tps/src/cli.rs b/bench-tps/src/cli.rs index 88bf52d00..083c64755 100644 --- a/bench-tps/src/cli.rs +++ b/bench-tps/src/cli.rs @@ -147,8 +147,11 @@ pub fn extract_args<'a>(matches: &ArgMatches<'a>) -> Config { args.num_nodes = n.to_string().parse().expect("can't parse num-nodes"); } - if let Some(s) = matches.value_of("s") { - args.duration = Duration::new(s.to_string().parse().expect("can't parse duration"), 0); + if let Some(duration) = matches.value_of("duration") { + args.duration = Duration::new( + duration.to_string().parse().expect("can't parse duration"), + 0, + ); } if let Some(s) = matches.value_of("tx_count") {