aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 10:46:39 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2023-04-02 10:46:53 +0200
commit3360e75027710dee2bc67501f99ad15b86b1c66a (patch)
tree9f5207899aff49ce5246e6122217f8bb738b4435
parent528470d2b0e03c3fb25f74df385c5ccd4be3dd13 (diff)
Run digest for all test data
-rwxr-xr-xscripts/test.sh13
1 files 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"
}