Created
December 12, 2018 20:24
-
-
Save juancampa/428c8946038835ee4c46158e267d0ca8 to your computer and use it in GitHub Desktop.
Hyper throughput perf test
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 | |
RUNS=5 | |
for i in `seq 1 $RUNS`; do | |
starttime=`date "+%s%3N"` | |
# Generate a significant amount of output | |
ls -Rl /usr/ /usr/ /usr/ /usr/ | |
endtime=`date "+%s%3N"` | |
durations[$i]=$(($endtime-$starttime)) | |
done | |
avg=0 | |
for i in `seq 1 $RUNS`; do | |
duration=${durations[$i]} | |
avg=$(($avg + $duration)) | |
echo Duration: $(($duration/1000)).$(($duration%1000))s | |
done | |
avg=$(($avg/$RUNS)) | |
echo Average: $(($avg/1000)).$(($avg%1000))s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment