From 07547fa698da04e541775e6a50d28a5cc4a16729 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sun, 2 Apr 2023 10:11:01 +0200 Subject: Don't print time/s for "n/a" value --- scripts/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index b0a97e5..cff1acf 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -85,7 +85,7 @@ function main() { stderr_file=$tmp_dir/$relay-$limit.stderr cat "$stdout_file" >> "$all_file" - avg_rate=$(grep 'Average rate:' "$stderr_file" | tail -n1 | xargs | cut -d' ' -f3) + avg_rate=$(grep 'Average rate:' "$stderr_file" | tail -n1 | xargs | cut -d' ' -f3)s if [[ -z "$avg_rate" ]]; then avg_rate="n/a" fi @@ -96,7 +96,7 @@ function main() { failure=$(grep 'Failure:' "$stderr_file" | tail -n1 | xargs | cut -d' ' -f2) failure_dns=$(grep 'DNS:' "$stderr_file" | tail -n1 | xargs | cut -d' ' -f2) failure_dns_detailed=$(grep 'DNS:' "$stderr_file" | tail -n1 | xargs | cut -d' ' -f3-) - info "relay:$relay limit:$limit/s avg-rate:$avg_rate/s onions:$num_onion connected:$success/$processed dns-error:$failure_dns/$failure $failure_dns_detailed" + info "relay:$relay limit:$limit/s avg-rate:$avg_rate onions:$num_onion connected:$success/$processed dns-error:$failure_dns/$failure $failure_dns_detailed" output_file=$out_dir/$relay-l$limit.txt mv "$stdout_file" "$output_file" -- cgit v1.2.3