#!/bin/ksh set -e # # format the data from bonnie tests so that it becomes readable by gnuplot # here we compare only two bench results with multiple runs (-x 5) # [[ -z $2 ]] && echo usage: bonnie-file1 bonnie-file2 && exit 1 file1=$1 file2=$2 lines=`wc -l < $file1` linesafter=`wc -l < $file2` echo there are $lines lines in $file1 echo there are $linesafter lines in $file2 (( lines != linesafter )) && echo number of lines differ between $file1 and $file2 && exit 1 echo -n writing to bonnie.dat ... (( line = 1 )) until (( line > lines )); do for set in 3 5 7 9 11; do before=`sed -n ${line}p $file1 | cut -f$set -d,` after=`sed -n ${line}p $file2 | cut -f$set -d,` cat < bonnie.dat && echo done cat > bonnie.plot <