From 9a171ec6399ad3e3a98fa2ebd284ec0bbd4f47ab Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sun, 2 Apr 2023 10:09:50 +0200 Subject: Run digest for relays with the same limit --- scripts/test.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/test.sh b/scripts/test.sh index dbd4b6f..b0a97e5 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -77,13 +77,13 @@ function main() { mkdir -p "$out_dir" for limit in ${limits[@]}; do - dup_file=$tmp_dir/dup.txt + all_file=$tmp_dir/dup.txt + rm -f "$all_file" - rm -f "$dup_file" for relay in ${relays[@]}; do stdout_file=$tmp_dir/$relay-$limit.stdout stderr_file=$tmp_dir/$relay-$limit.stderr - cut -d' ' -f1 "$stdout_file" >> "$dup_file" + cat "$stdout_file" >> "$all_file" avg_rate=$(grep 'Average rate:' "$stderr_file" | tail -n1 | xargs | cut -d' ' -f3) if [[ -z "$avg_rate" ]]; then @@ -102,11 +102,12 @@ function main() { mv "$stdout_file" "$output_file" done - num_sites=$(sort -Vu "$dup_file" | wc -l | cut -d' ' -f1) - info "all relays with limit $limit/s: $num_sites unique sites set onion location header or attribute" + num_sites=$(cut -d' ' -f1 "$all_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" done - info "stored collected test data in $out_dir" + info "stored output in $out_dir" rm -rf "$tmp_dir" } -- cgit v1.2.3