Last active
August 29, 2015 14:04
-
-
Save palladius/f382e6e4e4b15230725e to your computer and use it in GitHub Desktop.
Test latency to two EU/US-hosted otherwise-identical GAE apps
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
#!/bin/bash | |
# This script tries to find the difference in latency between Us/EU HTTP/HTTPS AppEngine apps. | |
# Also testing a simple '/' path from a '/slow' (which does a sleep(1) and simulates some traffic on page). | |
# Appids: | |
# - http://eu-ricc-test.appspot.com/ | |
# - http://us-ricc-test.appspot.com/ | |
VER=1.1c | |
WHERE="$(hostname)" | |
WHEN="$(date +%Y%m%d-%H%M%S)" | |
DEST="out/testricc-$WHEN-v$VER/" | |
mkdir -p "$DEST" | |
for DATACENTER in eu us; do | |
for PROTO in http https; do | |
for handler in fast slow; do | |
URL="$PROTO://$DATACENTER-ricc-test.appspot.com/$handler" | |
curl -o /dev/null -s -w %{time_namelookup}\\n%{time_connect}\\n%{time_appconnect}\\n%{time_total}\\n "$URL" | tee $DEST/$DATACENTER-$PROTO-$handler.$WHERE.v$VER.curl | |
done | |
done | |
done | |
for f in $DEST/*.curl; do | |
echo -e "$f: \t $(tail -1 $f)" | tee -a "$DEST/synoptic-$WHERE-v$VER.txt" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment