X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio_generate_plots;h=9b1e1ca59ecf7df69d38aa2769e9b84c25b5c1c5;hp=f410efe2b50c30b194d9892891693d690393698b;hb=0a4957c60fb35db0973c15c4c2adbd3bac854ccd;hpb=ebac4655dd3624f3296ff83be48e0cdc02852f18 diff --git a/fio_generate_plots b/fio_generate_plots index f410efe2..9b1e1ca5 100755 --- a/fio_generate_plots +++ b/fio_generate_plots @@ -7,6 +7,12 @@ if [ "$1"x == "x" ]; then exit 1 fi +GNUPLOT=$(which gnuplot) +if [ ! -x $GNUPLOT ]; then + echo You need gnuplot installed to generate graphs + exit 1 +fi + TITLE=$1 PLOT_LINE="" @@ -14,16 +20,17 @@ for i in *bw.log; do if [ ! -r $i ]; then continue fi + PT=$(echo $i | sed s/_bw.log//g) if [ "$PLOT_LINE"x != "x" ]; then PLOT_LINE=$PLOT_LINE", " fi - PLOT_LINE=$PLOT_LINE"'$i' with lines" + PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines" done if [ "$PLOT_LINE"x != "x" ]; then echo Making bw logs - echo "set title 'Bandwidth - $TITLE'; set xlabel 'time (msec)'; set ylabel 'KiB/sec'; set terminal png; set output '$TITLE-bw.png'; plot " $PLOT_LINE | gnuplot - + echo "set title 'Bandwidth - $TITLE'; set xlabel 'time (msec)'; set ylabel 'KiB/sec'; set terminal png; set output '$TITLE-bw.png'; plot " $PLOT_LINE | $GNUPLOT - fi PLOT_LINE="" @@ -31,16 +38,17 @@ for i in *slat.log; do if [ ! -r $i ]; then continue fi + PT=$(echo $i | sed s/_slat.log//g) if [ "$PLOT_LINE"x != "x" ]; then PLOT_LINE=$PLOT_LINE", " fi - PLOT_LINE=$PLOT_LINE"'$i' with lines" + PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines" done if [ "$PLOT_LINE"x != "x" ]; then echo Making slat logs $PLOT_LINE - echo "set title 'Submission latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-slat.png'; plot " $PLOT_LINE | gnuplot - + echo "set title 'Submission latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-slat.png'; plot " $PLOT_LINE | $GNUPLOT - fi PLOT_LINE="" @@ -48,14 +56,15 @@ for i in *clat.log; do if [ ! -r $i ]; then continue fi + PT=$(echo $i | sed s/_clat.log//g) if [ "$PLOT_LINE"x != "x" ]; then PLOT_LINE=$PLOT_LINE", " fi - PLOT_LINE=$PLOT_LINE"'$i' with lines" + PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines" done if [ "$PLOT_LINE"x != "x" ]; then echo Making clat logs $PLOT_LINE - echo "set title 'Completion latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-clat.png'; plot " $PLOT_LINE | gnuplot - + echo "set title 'Completion latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-clat.png'; plot " $PLOT_LINE | $GNUPLOT - fi