Created
November 30, 2018 03:08
-
-
Save not-for-me/34b0d4775624359157a122097986a2c4 to your computer and use it in GitHub Desktop.
Simple ab test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ARG=($@) | |
arg_count=${#ARG[@]} | |
if [[ $arg_count -lt 4 ]]; then | |
echo "Usage: $0 loopCount (ab -n opt param) (ab -c opt param) url" >&2 | |
exit 1 | |
fi | |
loop=${ARG[0]} | |
num=${ARG[1]} | |
conn=${ARG[2]} | |
url=${ARG[3]} | |
i=0 | |
while [ "$i" -lt $loop ]; | |
do | |
echo "$i times call ab $num, $conn" | |
ab -n $num -c $conn $url | |
i=$((i + 1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment