From 5903b9f105bb2c4d96933b6bcacf7072c6852900 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sun, 27 Dec 2015 14:47:56 +0800 Subject: [PATCH] Fix IO test --- bench.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bench.sh b/bench.sh index 3b72227..3f0061c 100644 --- a/bench.sh +++ b/bench.sh @@ -121,8 +121,11 @@ io1=$( io_test ) io2=$( io_test ) io3=$( io_test ) 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}' ) +[ "`echo $io2 | awk 'NR==1 {print $2}'`" == "GB/s" ] && ioraw2=$( awk 'BEGIN{print '$ioraw2' * 1024}' ) 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 "I/O speed(1st run) : $io1"