Skip to content

Instantly share code, notes, and snippets.

@aspires
Last active January 14, 2016 14:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aspires/8189975 to your computer and use it in GitHub Desktop.
Save aspires/8189975 to your computer and use it in GitHub Desktop.
Fastly Benchmark Script
#!/bin/bash
# Dependencies: ApacheBench, MTR
REQUESTS=100
CONCURRENCY=10
FASTLY='www.example.com.global.prod.fastly.net'
CURRENT='www.example.com'
for url in 'path/to/test' 'path/to/test2' 'path/to/test3'; do
for host in $CURRENT $FASTLY; do
ab -n $REQUESTS -c $CONCURRENCY "http://${host}/${url}" >> fastly.ab.log
#echo "http://${host}/${url}"
done
done
for host in $CURRENT $FASTLY; do
echo $host >> fastly.mtr.log
mtr -c 50 -w -r $host >> fastly.mtr.log
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment