Last active
October 4, 2017 12:34
-
-
Save elmariofredo/01f0f9818925a42ccfc03ff8adc5d6d0 to your computer and use it in GitHub Desktop.
Simple http throughput test using curl
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
#!/bin/bash | |
URL=$1 | |
NAME=${URL:7} | |
echo "Press [CTRL+C] to stop..." | |
while : | |
do | |
echo $(date +%s) $(curl --max-time 10 -w "%{time_connect} %{time_starttransfer} %{time_total} %{http_code}" -o NUL -s "${URL}") | tee -a ${NAME}.log.txt | |
sleep 3 | |
done | |
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
#!/bin/sh | |
gnuplot -e "set terminal svg;set xdata time;set timefmt '%s';set format x '%m/%d/%Y %H:%M:%S';set xtics rotate by 90 offset 0,-6;set bmargin 10;set output 'plot.svg';plot 'github.com.log.txt' using 1:4 with lines" |
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
#!/bin/sh | |
screen -S github -d -m ./measure.sh http://github.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment