From 48b534458616c0d020b28ad60ed51cee1e43346e Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 23 Jul 2018 14:11:40 -0700 Subject: [PATCH] Check for 0 TPS explicitly --- src/bin/bench-tps.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bin/bench-tps.rs b/src/bin/bench-tps.rs index 57928bab6d..91b98355d7 100644 --- a/src/bin/bench-tps.rs +++ b/src/bin/bench-tps.rs @@ -329,12 +329,11 @@ fn main() { let first_tx_count = client.transaction_count(); println!("Initial transaction count {}", first_tx_count); - println!("Sampling TPS every second...",); - // Setup a thread per validator to sample every period // collect the max transaction rate and total tx count seen let maxes = Arc::new(RwLock::new(Vec::new())); let sample_period = 1; // in seconds + println!("Sampling TPS every {} second...", sample_period); let v_threads: Vec<_> = validators .into_iter() .map(|v| { @@ -401,7 +400,7 @@ fn main() { maybe_flag ); - if stats.tx == 0 { + if stats.tps == 0.0 { nodes_with_zero_tps += 1; } total_maxes += stats.tps;