From dc640bc658f12e8b20b5334748a40ad823529d41 Mon Sep 17 00:00:00 2001 From: colin Date: Tue, 6 Feb 2024 20:59:30 +0000 Subject: [PATCH] Update docker/bench/run-ab.sh --- docker/bench/run-ab.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docker/bench/run-ab.sh b/docker/bench/run-ab.sh index 3730d09..28d30ab 100644 --- a/docker/bench/run-ab.sh +++ b/docker/bench/run-ab.sh @@ -97,17 +97,6 @@ for url in "${URLS[@]}"; do fi done -if [ ${#failed_urls[@]} -gt 0 ]; then - echo "Summary of failed URLs:" | tee -a "$log_file" - for failed_url in "${failed_urls[@]}"; do - echo "- $failed_url" | tee -a "$log_file" - done - exit 1 -else - echo "All URLs passed the performance and TTFB tests." | tee -a "$log_file" - exit 0 -fi - parse_to_csv() { local input="$1" local output="$2" @@ -138,4 +127,16 @@ upload_to_hastebin() { echo "Failed to upload to hastebin." fi } -upload_to_hastebin "/logs/scan.csv" \ No newline at end of file +upload_to_hastebin "/logs/scan.csv" + +if [ ${#failed_urls[@]} -gt 0 ]; then + echo "Summary of failed URLs:" | tee -a "$log_file" + for failed_url in "${failed_urls[@]}"; do + echo "- $failed_url" | tee -a "$log_file" + done + exit 1 +else + echo "All URLs passed the performance and TTFB tests." | tee -a "$log_file" + exit 0 +fi +