Last active
August 29, 2015 14:02
-
-
Save michaelcontento/9b82eaf44ab5d56d7f61 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
#!/usr/bin/env zsh | |
sed -i '' -e 's/^antigen bundle/#antigen bundle/' ~/.zshrc | |
tests=$(grep "#antigen bundle" ~/.zshrc | wc -l) | |
last_sum=0 | |
for it in $(seq 1 $tests); do | |
sum=0 | |
name=$(grep '#antigen bundle' ~/.zshrc | head -n 1 | cut -d' ' -f3) | |
sed -i '' -e '1,/#antigen bundle/s/#//' ~/.zshrc | |
for is in {1..5}; do | |
sum=$((sum + $(/usr/bin/time zsh -i -c exit 2>&1 | cut -d" " -f9) )) | |
done | |
sum=$((sum / 5)) | |
diff=$((sum - last_sum)) | |
last_sum=$sum | |
echo "$name\t$diff\t$sum" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment