Skip to content

Instantly share code, notes, and snippets.

@fjarrett
Created January 23, 2016 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fjarrett/e266410008c22d2fa227 to your computer and use it in GitHub Desktop.
Save fjarrett/e266410008c22d2fa227 to your computer and use it in GitHub Desktop.
Basic load testing script
#!/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