Created
August 31, 2016 03:44
-
-
Save desyncr/35209c7f2e7d9a5250e040bca6977b2d to your computer and use it in GitHub Desktop.
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/bash | |
rm -f /tmp/mtime.$$ | |
for x in {1..10} | |
do | |
/usr/bin/time -f "real %e user %U sys %S" -a -o /tmp/mtime.$$ $@ | |
tail -1 /tmp/mtime.$$ | |
done | |
awk '{ et += $2; ut += $4; st += $6; count++ } END { printf "Average:\nreal %.3f user %.3f sys %.3f\n", et/count, ut/count, st/count }' /tmp/mtime.$$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment