@@ -673,7 +673,7 @@ elif [ -z "$SKIP_FIO" ]; then
673
673
JSON_RESULT+=' ,"speed_w":' ${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+2]} ' ,"iops_w":' ${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+5]} ' ,"speed_rw":' ${DISK_RESULTS_RAW[(DISK_COUNT+1)*6]}
674
674
JSON_RESULT+=' ,"iops_rw":' ${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+3]} ' ,"speed_units":"KBps"},'
675
675
fi
676
- DISK_COUNT=$(( $ DISK_COUNT + 2 ))
676
+ DISK_COUNT=$(( DISK_COUNT + 2 ))
677
677
done
678
678
[[ -n $JSON ]] && JSON_RESULT=${JSON_RESULT:: ${# JSON_RESULT} -1} && JSON_RESULT+=' ]'
679
679
fi
@@ -982,7 +982,7 @@ function launch_geekbench {
982
982
983
983
# if the skip geekbench flag was set, skip the system performance test, otherwise test system performance
984
984
if [ -z " $SKIP_GEEKBENCH " ]; then
985
- [[ -n $JSON ]] && JSON_RESULT+=( " ,\" geekbench\" :[" )
985
+ [[ -n $JSON ]] && JSON_RESULT+=" ,\" geekbench\" :["
986
986
if [[ $GEEKBENCH_4 == * True* ]]; then
987
987
launch_geekbench 4
988
988
fi
@@ -994,8 +994,8 @@ if [ -z "$SKIP_GEEKBENCH" ]; then
994
994
if [[ $GEEKBENCH_6 == * True* ]]; then
995
995
launch_geekbench 6
996
996
fi
997
- [[ -n $JSON ]] && [[ " ${JSON_RESULT: -1} " == ' ,' ]] && JSON_RESULT=$( echo " $ JSON_RESULT" | sed ' s/,$// ' )
998
- [[ -n $JSON ]] && JSON_RESULT+=' ] '
997
+ [[ -n $JSON ]] && [[ " ${JSON_RESULT: -1} " == ' ,' ]] && JSON_RESULT=" ${ JSON_RESULT% ,} "
998
+ [[ -n $JSON ]] && JSON_RESULT+=" ] "
999
999
fi
1000
1000
1001
1001
# finished all tests, clean up all YABS files and exit
@@ -1021,13 +1021,13 @@ function calculate_time_taken() {
1021
1021
else
1022
1022
echo " YABS completed in ${time_taken} sec"
1023
1023
fi
1024
- [[ -n $JSON ]] && JSON_RESULT+=' , "runtime":{"start":' $start_time ' ,"end":' $end_time ' ,"elapsed":' $time_taken ' }'
1024
+ [[ -n $JSON ]] && JSON_RESULT+=" , \ " runtime\ " :{\ " start\ " :'$start_time ',\ " end\ " :'$end_time ',\ " elapsed\ " :'$time_taken '}"
1025
1025
}
1026
1026
1027
1027
calculate_time_taken " $YABS_END_TIME " " $YABS_START_TIME "
1028
1028
1029
1029
if [[ -n $JSON ]]; then
1030
- JSON_RESULT+=' } '
1030
+ JSON_RESULT+=" } "
1031
1031
1032
1032
# write json results to file
1033
1033
if [[ $JSON = * w* ]]; then
0 commit comments