add ingress statistics generation script

This commit is contained in:
Simon Belmas
2024-06-27 15:04:16 +02:00
parent 14483b7428
commit b635dd74f2
3 changed files with 39 additions and 0 deletions

28
analyse.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/zsh -e
# This script asserts that init.sh workload script is left as is.
script_dir=$(dirname $(readlink -f ${0}))
results_file=${script_dir}/analyse_results.csv
if [[ -z "${1}" ]] ; then
echo "First parameter must be url"
exit 1
else
analyse_url=${1}
fi
if [[ "${2}" == "keep_results" ]] ; then
keep_results=true
else
keep_results=false
echo '' > ${results_file}
fi
echo Launching test, press CTRL+C to exit
while true ; do
echo "$(date -Iseconds);$(curl -m 2 -s -w ";%{time_total};%{http_code}" -k "${analyse_url}" | tr -d "\n")" | tee -a ${results_file}
sleep 1
done