#!/bin/ksh set -e # # format the data from bonnie tests so that it becomes readable by gnuplot # here we compare many bench results with multiple runs (-x 5) # [[ -z $4 ]] && echo usage: bonnie-file1,2,3,4 && exit 1 file1=$1 file2=$2 file3=$3 file4=$4 # assuming all benchs have same amount of runs lines=`wc -l < $file1` echo -n writing to bonnie.dat ... (( line = 1 )) until (( line > lines )); do for set in 4 6 8 10 12; do value1=`sed -n ${line}p $file1 | cut -f$set -d,` value2=`sed -n ${line}p $file2 | cut -f$set -d,` value3=`sed -n ${line}p $file3 | cut -f$set -d,` value4=`sed -n ${line}p $file4 | cut -f$set -d,` cat < bonnie.dat && echo done cat > bonnie.plot <