aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 10:09:50 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 10:09:50 +0200
commit9a171ec6399ad3e3a98fa2ebd284ec0bbd4f47ab (patch)
treed41d9ad4373033141af6e417a10456738f02aea0
parent0845fbfd1916b3c153caa14a0719666177e10c3b (diff)
Run digest for relays with the same limit
-rwxr-xr-xscripts/test.sh13
1 files changed, 7 insertions, 6 deletions
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"
}