Add --duration, --csv, --quiet flags for automated testing
All checks were successful
CI / test (push) Successful in 1m27s
All checks were successful
CI / test (push) Successful in 1m27s
- --duration N: run client test for N seconds then exit - --csv <file>: append results to CSV (creates with headers if new) - --quiet/-q: suppress terminal output (for scripted/machine use) CSV columns: timestamp, host, port, protocol, direction, duration_s, tx_avg_mbps, rx_avg_mbps, tx_bytes, rx_bytes, lost_packets, auth_type Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -123,6 +123,10 @@ pub fn print_status(
|
||||
elapsed: Duration,
|
||||
lost_packets: Option<u64>,
|
||||
) {
|
||||
if crate::csv_output::is_quiet() {
|
||||
return;
|
||||
}
|
||||
|
||||
let secs = elapsed.as_secs_f64();
|
||||
let bits = bytes as f64 * 8.0;
|
||||
let bw = if secs > 0.0 { bits / secs } else { 0.0 };
|
||||
|
||||
Reference in New Issue
Block a user