Skip to content

Commit

Permalink
Update rpi-benchmark.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
aikoncwd authored Jun 9, 2016
1 parent 4b633c4 commit c7622ac
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions rpi-benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,61 +41,40 @@ printf "sd_clock="
grep "actual clock" /sys/kernel/debug/mmc0/ios 2>/dev/null | awk '{printf("%0.3f MHz", $3/1000000)}'
echo -e "\n\e[0m"

echo -e "Running InternetSpeed test...\e[93m"
spinner &
echo -e "Running InternetSpeed test...\e[93m" & spinner
speedtest-cli --simple
kill "$!" >/dev/null 2>&1
printf "\b\n"
echo -e "\e[0m"

echo -e "Running CPU test...\e[93m"
spinner &
sysbench --num-threads=4 --validate=on --test=cpu --cpu-max-prime=5000 run | grep 'total time:\|min:\|avg:\|max:' | tr -s [:space:]
kill "$!" >/dev/null 2>&1
printf "\b"
sysbench --num-threads=4 --validate=on --test=cpu --cpu-max-prime=5000 run | grep 'total time:\|min:\|avg:\|max:' | tr -s [:space:] & spinner
echo -e ""
vcgencmd measure_temp
echo -e "\e[0m"

echo -e "Running THREADS test...\e[93m"
spinner &
sysbench --num-threads=4 --validate=on --test=threads --thread-yields=4000 --thread-locks=6 run | grep 'total time:\|min:\|avg:\|max:' | tr -s [:space:]
kill "$!" >/dev/null 2>&1
printf "\b"
sysbench --num-threads=4 --validate=on --test=threads --thread-yields=4000 --thread-locks=6 run | grep 'total time:\|min:\|avg:\|max:' | tr -s [:space:] & spinner
echo -e ""
vcgencmd measure_temp
echo -e "\e[0m"

echo -e "Running MEMORY test...\e[93m"
spinner &
sysbench --num-threads=4 --validate=on --test=memory --memory-block-size=1K --memory-total-size=3G --memory-access-mode=seq run | grep 'Operations\|transferred\|total time:\|min:\|avg:\|max:' | tr -s [:space:]
kill "$!" >/dev/null 2>&1
printf "\b"
sysbench --num-threads=4 --validate=on --test=memory --memory-block-size=1K --memory-total-size=3G --memory-access-mode=seq run | grep 'Operations\|transferred\|total time:\|min:\|avg:\|max:' | tr -s [:space:] & spinner
echo -e ""
vcgencmd measure_temp
echo -e "\e[0m"

echo -e "Running HDPARM test...\e[93m"
spinner &
hdparm -t /dev/mmcblk0 | grep Timing
kill "$!" >/dev/null 2>&1
printf "\b"
hdparm -t /dev/mmcblk0 | grep Timing & spinner
vcgencmd measure_temp
echo -e "\e[0m"

echo -e "Running DD WRITE test...\e[93m"
spinner &
rm -f ~/test.tmp && sync && dd if=/dev/zero of=~/test.tmp bs=1M count=512 conv=fsync 2>&1 | grep -v records
kill "$!" >/dev/null 2>&1
printf "\b"
rm -f ~/test.tmp && sync && dd if=/dev/zero of=~/test.tmp bs=1M count=512 conv=fsync 2>&1 | grep -v records & spinner
vcgencmd measure_temp
echo -e "\e[0m"

echo -e "Running DD READ test...\e[93m"
spinner &
echo -e 3 > /proc/sys/vm/drop_caches && sync && dd if=~/test.tmp of=/dev/null bs=1M 2>&1 | grep -v records
kill "$!" >/dev/null 2>&1
printf "\b"
echo -e 3 > /proc/sys/vm/drop_caches && sync && dd if=~/test.tmp of=/dev/null bs=1M 2>&1 | grep -v records & spinner
vcgencmd measure_temp
rm -f ~/test.tmp
echo -e "\e[0m"
Expand Down

0 comments on commit c7622ac

Please sign in to comment.