Add apache benchmark installation check

This commit is contained in:
charleshthomasiii 2020-04-15 13:52:46 -04:00
parent be6a7876b4
commit 09836bffef
2 changed files with 12 additions and 0 deletions

View file

@ -11,6 +11,12 @@ declare -a arr=(
"https://torrents-csv.ml/service/search?q=wheel&page=1&type_=torrent"
)
## check if ab installed
if ! [ -x "$(command -v ab)" ]; then
echo 'Error: ab (Apache Bench) is not installed. https://httpd.apache.org/docs/2.4/programs/ab.html' >&2
exit 1
fi
## now loop through the above array
for i in "${arr[@]}"
do

View file

@ -15,6 +15,12 @@ declare -a arr=(
"/api/v1/post/list?sort=Hot&type_=All"
)
## check if ab installed
if ! [ -x "$(command -v ab)" ]; then
echo 'Error: ab (Apache Bench) is not installed. https://httpd.apache.org/docs/2.4/programs/ab.html' >&2
exit 1
fi
## now loop through the above array
for path in "${arr[@]}"
do