aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 10:11:01 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 10:11:01 +0200
commit07547fa698da04e541775e6a50d28a5cc4a16729 (patch)
tree05c2f7b7177059c3505bc7a475f9caa195902ca1
parent9a171ec6399ad3e3a98fa2ebd284ec0bbd4f47ab (diff)
Don't print time/s for "n/a" value
-rwxr-xr-xscripts/test.sh4
1 files 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"