Created
September 30, 2013 02:09
-
-
Save JCotton1123/6758588 to your computer and use it in GitHub Desktop.
Apache Bench script - needs some work
This file contains hidden or 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
#!/usr/local/bin/bash | |
numberOfRequestsValues="10 20 40" | |
concurrencyValues="1 2 4" | |
abCmd="/usr/local/sbin/ab" | |
for url in $(cat $1); do | |
echo "# $url" | |
echo | |
for numberOfRequests in $numberOfRequestsValues; do | |
for concurrency in $concurrencyValues; do | |
echo "## Requests: $numberOfRequests; Concurrency: $concurrency" | |
echo '```' | |
$abCmd -r -n $numberOfRequests -c $concurrency $url 2>&1 | |
echo '```' | |
echo | |
done | |
done | |
echo "## Number of requests serviced in 20 seconds" | |
$abCmd -t 20 $url 2>&1 | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment