summaryrefslogtreecommitdiffstats
path: root/server/query_testing/api_benchmark.sh
diff options
context:
space:
mode:
Diffstat (limited to 'server/query_testing/api_benchmark.sh')
-rwxr-xr-xserver/query_testing/api_benchmark.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/query_testing/api_benchmark.sh b/server/query_testing/api_benchmark.sh
index 8f8c65f1..9f06580a 100755
--- a/server/query_testing/api_benchmark.sh
+++ b/server/query_testing/api_benchmark.sh
@@ -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