#!/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 $3 ]] && echo usage: bonnie-file1 bonnie-file2 bonnie-file3 && exit 1 file1=$1 file2=$2 file3=$3 # 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 3 5 7 9 11; 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,` cat < bonnie.dat && echo done cat > bonnie.plot <