Skip to content

Instantly share code, notes, and snippets.

@seanhess
Created January 29, 2011 22:06
Show Gist options
  • Save seanhess/802251 to your computer and use it in GitHub Desktop.
Save seanhess/802251 to your computer and use it in GitHub Desktop.
apache benchmark stepping test
#!/bin/bash
url=$1
rest=5
echo "AB Testing $url in steps"
# Steps = [5, 10, 25, 50, 75, 100, 125, 150, 175, 200]
function step {
concurrency=$1
number=$((concurrency*10))
echo ""
echo "ab -n $number -c $concurrency -d $url"
echo "--------------------------------------------------------------------"
ab -n $number -c $concurrency -d $url
echo "Resting for $rest seconds"
sleep $rest # give it time to rest
}
step 5
step 10
step 25
step 50
step 75
step 100
step 125
step 150
step 175
step 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment