diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/test.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/test.sh b/scripts/test.sh index a57c74c..809c5af 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -84,13 +84,18 @@ function main() { stderr_file=$tmp_dir/$relay-$limit.stderr cut -d' ' -f1 $stdout_file >> $dup_file + avg_rate=$(grep 'Average rate:' $stderr_file | tail -n1 | xargs | cut -d' ' -f3) + if [[ -z "$avg_rate" ]]; then + avg_rate="n/a" + fi + num_onion=$(wc -l $stdout_file | cut -d' ' -f1) processed=$(grep Processed $stderr_file | tail -n1 | xargs | cut -d' ' -f2) success=$(grep Success $stderr_file | tail -n1 | xargs | cut -d' ' -f2) 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 onions:$num_onion connected:$success/$processed dns-error:$failure_dns/$failure $failure_dns_detailed" + 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" output_file="$out_dir/$relay-l$limit.txt" mv $stdout_file $output_file |