aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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"
}