Created
January 23, 2016 23:22
-
-
Save fjarrett/e266410008c22d2fa227 to your computer and use it in GitHub Desktop.
Basic load testing script
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/bash | |
echo -n "Enter a URL to load test: " | |
read URL | |
# Ensure the URL has a trailing slash | |
[[ ${URL:${#URL}-1:1} != "/" ]] && URL="$URL/"; : | |
echo -n "Number of requests: " | |
read REQUESTS | |
echo -n "Number of concurrent connections: " | |
read CONNECTIONS | |
ab -n $REQUESTS -c $CONNECTIONS $URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment