From 5cef615bdce9e0abf88913ef22ad6d19ad8bda83 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Thu, 24 Nov 2016 22:38:36 +0900 Subject: [PATCH] update IO test position --- bench.sh | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/bench.sh b/bench.sh index 4f91913..c7f63c9 100644 --- a/bench.sh +++ b/bench.sh @@ -132,20 +132,12 @@ echo "OS : $opsy" echo "Arch : $arch ($lbit Bit)" echo "Kernel : $kern" next - -echo -e "Node Name\t\t\tIPv4 address\t\tDownload Speed" -speed && next -if [[ "$ipv6" != "" ]]; then - echo -e "Node Name\t\t\tIPv6 address\t\tDownload Speed" - speed_v6 && next -fi - io1=$( io_test ) -echo "I/O speed(1st run) : $io1" +echo "I/O speed(1st run) : $io1" io2=$( io_test ) -echo "I/O speed(2nd run) : $io2" +echo "I/O speed(2nd run) : $io2" io3=$( io_test ) -echo "I/O speed(3rd run) : $io3" +echo "I/O speed(3rd run) : $io3" ioraw1=$( echo $io1 | awk 'NR==1 {print $1}' ) [ "`echo $io1 | awk 'NR==1 {print $2}'`" == "GB/s" ] && ioraw1=$( awk 'BEGIN{print '$ioraw1' * 1024}' ) ioraw2=$( echo $io2 | awk 'NR==1 {print $1}' ) @@ -154,5 +146,11 @@ ioraw3=$( echo $io3 | awk 'NR==1 {print $1}' ) [ "`echo $io3 | awk 'NR==1 {print $2}'`" == "GB/s" ] && ioraw3=$( awk 'BEGIN{print '$ioraw3' * 1024}' ) ioall=$( awk 'BEGIN{print '$ioraw1' + '$ioraw2' + '$ioraw3'}' ) ioavg=$( awk 'BEGIN{print '$ioall'/3}' ) -echo "Average I/O speed : $ioavg MB/s" -echo +echo "Average I/O speed : $ioavg MB/s" +next +echo -e "Node Name\t\t\tIPv4 address\t\tDownload Speed" +speed && next +if [[ "$ipv6" != "" ]]; then + echo -e "Node Name\t\t\tIPv6 address\t\tDownload Speed" + speed_v6 && next +fi