Update docker/bench/run-ab.sh
This commit is contained in:
parent
4815fa00a3
commit
dc640bc658
|
@ -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"
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue