Created
May 1, 2016 21:58
-
-
Save dgarros/664d5b251a8ff449a235dd92f3b427a0 to your computer and use it in GitHub Desktop.
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 | |
## | |
## This script will launch vagrant 10 times and measured how long it takes for the topology to boot up | |
## Topology will be destroyed after the test | |
c=1 | |
while [ $c -le 10 ] | |
do | |
START=$(date +%s); | |
# echo "1- Launching VM" | |
vagrant up > vagrant_boottime.log 2>&1 | |
END=$(date +%s); | |
TIME=$((END-START)); | |
# echo "3- Destroying VM" | |
vagrant destroy -f > vagrant_boottime.log 2>&1 | |
if [ $? -eq 0 ] | |
then | |
echo "$c | SUCCESS : VM Successfully Launched in $TIME sec" | |
else | |
echo "$c | FAILED : VM Launch Failed in $TIME sec" | |
fi | |
(( c++ )) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment