From 14d382683715594b7dce5ca0b3af67181098698f Mon Sep 17 00:00:00 2001 From: Neil Tallim Date: Fri, 23 Sep 2022 10:12:43 -0600 Subject: [PATCH] Added a warning when sends are blocked --- src/protocol/results.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/protocol/results.rs b/src/protocol/results.rs index 61548d0..852361f 100644 --- a/src/protocol/results.rs +++ b/src/protocol/results.rs @@ -824,6 +824,7 @@ impl TestResults for TcpTestResults { let mut duration_receive:f64 = 0.0; let mut bytes_received:u64 = 0; + let mut sends_blocked = false; for (stream_idx, stream) in self.stream_results.values().enumerate() { for (i, sr) in stream.send_results.iter().enumerate() { @@ -835,6 +836,8 @@ impl TestResults for TcpTestResults { stream_send_durations[stream_idx] += sr.duration as f64; bytes_sent += sr.bytes_sent; + + sends_blocked |= sr.sends_blocked > 0; } for (i, rr) in stream.receive_results.iter().enumerate() { @@ -899,6 +902,9 @@ impl TestResults for TcpTestResults { receive_bytes_per_second, receive_throughput, bytes_received, receive_bytes_per_second * stream_count as f64, total_receive_throughput, ); + if sends_blocked { + output.push_str(&format!("\nthroughput throttled by buffer limitations")); + } if !self.is_success() { output.push_str(&format!("\nTESTING DID NOT COMPLETE SUCCESSFULLY")); } @@ -1097,6 +1103,7 @@ impl TestResults for UdpTestResults { let mut unbroken_sequence_count:u64 = 0; let mut jitter_weight:f64 = 0.0; + let mut sends_blocked = false; for (stream_idx, stream) in self.stream_results.values().enumerate() { for (i, sr) in stream.send_results.iter().enumerate() { @@ -1109,6 +1116,8 @@ impl TestResults for UdpTestResults { bytes_sent += sr.bytes_sent; packets_sent += sr.packets_sent; + + sends_blocked |= sr.sends_blocked > 0; } for (i, rr) in stream.receive_results.iter().enumerate() { @@ -1197,6 +1206,9 @@ impl TestResults for UdpTestResults { if jitter_calculated { output.push_str(&format!("\njitter: {:.6}s over {} consecutive packets", jitter_weight / (unbroken_sequence_count as f64), unbroken_sequence_count)); } + if sends_blocked { + output.push_str(&format!("\nthroughput throttled by buffer limitations")); + } if !self.is_success() { output.push_str(&format!("\nTESTING DID NOT COMPLETE SUCCESSFULLY")); }