From 52ea862501f05bcd7735852728cef534b230bfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yavuz=20Ayd=C4=B1n?= Date: Thu, 15 Apr 2021 15:58:28 +0200 Subject: [PATCH] Removed dd test and updated ioping tests --- snench.sh | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/snench.sh b/snench.sh index 1616e6e..b063cd5 100755 --- a/snench.sh +++ b/snench.sh @@ -141,7 +141,7 @@ fi printf '%s\n' '-------------------------------------------------' printf ' snench.sh v2021.04.15 -- https://git.snel.com/snelcom/snench\n' -date -u '+ benchmark timestamp: %F %T UTC' +date -u '+ benchmark timestamp: %F %T UTC' printf '%s\n' '-------------------------------------------------' printf '\n' @@ -233,29 +233,12 @@ printf 'ioping: seek rate\n ' "$ioping_cmd" -DR -w 5 . | tail -n 1 printf 'ioping: sequential read speed\n ' "$ioping_cmd" -DRL -w 5 . | tail -n 2 | head -n 1 - -printf '\n' - -# dd disk test -printf 'dd: sequential write speed\n' - -if [ -z "$gnu_dd" ] -then - printf ' %s\n' '[disabled due to missing GNU dd]' -else - io1=$( dd_benchmark ) - printf ' 1st run: %s\n' "$(printf '%d\n' "$io1" | Bps_to_MiBps)" - - io2=$( dd_benchmark ) - printf ' 2nd run: %s\n' "$(printf '%d\n' "$io2" | Bps_to_MiBps)" - - io3=$( dd_benchmark ) - printf ' 3rd run: %s\n' "$(printf '%d\n' "$io3" | Bps_to_MiBps)" - - # Calculating avg I/O (better approach with awk for non int values) - ioavg=$( awk 'BEGIN{printf("%.0f", ('"$io1"' + '"$io2"' + '"$io3"')/3)}' ) - printf ' average: %s\n' "$(printf '%d\n' "$ioavg" | Bps_to_MiBps)" -fi +printf 'ioping: sequential write speed\n ' +"$ioping_cmd" -DRLW -w 5 . | tail -n 2 | head -n 1 +printf 'ioping: random 4k read speed\n ' +"$ioping_cmd" -DR -w 5 . | tail -n 2 | head -n 1 +printf 'ioping: random 4k write speed\n ' +"$ioping_cmd" -DRW -w 5 . | tail -n 2 | head -n 1 printf '\n'