Created
June 1, 2014 18:08
-
-
Save octagonal/b45d4d2d9f226f7be3e4 to your computer and use it in GitHub Desktop.
Simple webserver speed measuring
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
#!/usr/bin/bash | |
# $1 => filename to write to | |
# $2 => URL to fetch | |
# $3 => Amount of time in-between measurements | |
while true; do | |
echo -n $(date +%H:%M:%S) | tee -a $1; echo -n ";" | tee -a $1; | |
echo -n $(curl -o /dev/null -s -w "%{time_total}" $2 |sed "s/\./,/") | tee -a $1; echo "" | tee -a $1; | |
sleep $3; | |
done | |
# This will give you a simple way to look at the connection speed of a specific URL over time | |
# It writes valid csv files so you can get graphs out of the file using Excel or whatever (area charts seem to work best) | |
# No, this is not scientifically accurate | |
# No, this is not a substitute for actual measurement software |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment