Last active
November 18, 2016 19:40
-
-
Save lucascnr/21b177eb1ba625e49804a0b43f10beef to your computer and use it in GitHub Desktop.
Download a Website N times and get the average, giving as first argument the server name and how many times as the second argument.
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/usr/bash | |
BEGIN=$(date -u +%s); | |
for i in `seq 1 $2`; do | |
$(wget -H -p --cache=off --delete-after $1 &> /dev/null) | |
done | |
END=$(date -u +%s); | |
echo "The test started at:" $BEGIN; | |
echo "And ended at:" $END; | |
echo "The average was:" $(((END-BEGIN)/$2)) "seconds" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment