From 3360e75027710dee2bc67501f99ad15b86b1c66a Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sun, 2 Apr 2023 10:46:39 +0200 Subject: Run digest for all test data --- scripts/test.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index c26a118..d19df3c 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -79,13 +79,15 @@ function main() { mkdir -p "$out_dir" for limit in ${limits[@]}; do - all_file=$tmp_dir/dup.txt - rm -f "$all_file" + all_file=$tmp_dir/all.txt + lim_file=$tmp_dir/lim.txt + rm -f "$lim_file" for relay in ${relays[@]}; do stdout_file=$tmp_dir/$relay-$limit.stdout stderr_file=$tmp_dir/$relay-$limit.stderr cat "$stdout_file" >> "$all_file" + cat "$stdout_file" >> "$lim_file" avg_rate=$(grep 'Average rate:' "$stderr_file" | tail -n1 | xargs | cut -d' ' -f3)s if [[ -z "$avg_rate" ]]; then @@ -104,11 +106,14 @@ function main() { mv "$stdout_file" "$output_file" done - num_sites=$(cut -d' ' -f1 "$all_file" | sort -Vu | wc -l | cut -d' ' -f1) + num_sites=$(cut -d' ' -f1 "$lim_file" | sort -Vu | wc -l | cut -d' ' -f1) info "all relays with limit $limit/s: $num_sites unique sites set onion location header or attribute, digested results below" - ./digest.py -v info -i "$all_file" -o "$out_dir/onion-l$limit.txt" -d "$out_dir/domain-l$limit.txt" + ./digest.py -v info -i "$lim_file" -o "$out_dir/onion-l$limit.txt" -d "$out_dir/domain-l$limit.txt" done + info "digested results for all tests below" + ./digest.py -v info -i "$all_file" -o "$out_dir/onion-all.txt" -d "$out_dir/domain-all.txt" + info "stored output in $out_dir" rm -rf "$tmp_dir" } -- cgit v1.2.3