3 # Use gnuplot to generate plots from fio run with -l and/or -w
5 if [ "$1"x = "x" ]; then
10 GNUPLOT=$(which gnuplot)
11 if [ ! -x $GNUPLOT ]; then
12 echo You need gnuplot installed to generate graphs
23 PT=$(echo $i | sed s/_bw.log//g)
24 if [ "$PLOT_LINE"x != "x" ]; then
25 PLOT_LINE=$PLOT_LINE", "
28 PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
31 if [ "$PLOT_LINE"x != "x" ]; then
33 echo "set title 'Bandwidth - $TITLE'; set xlabel 'time (msec)'; set ylabel 'KB/sec'; set terminal png; set output '$TITLE-bw.png'; plot " $PLOT_LINE | $GNUPLOT -
37 for i in *slat.log; do
41 PT=$(echo $i | sed s/_slat.log//g)
42 if [ "$PLOT_LINE"x != "x" ]; then
43 PLOT_LINE=$PLOT_LINE", "
46 PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
49 if [ "$PLOT_LINE"x != "x" ]; then
50 echo Making slat logs $PLOT_LINE
51 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 -
55 for i in *clat.log; do
59 PT=$(echo $i | sed s/_clat.log//g)
60 if [ "$PLOT_LINE"x != "x" ]; then
61 PLOT_LINE=$PLOT_LINE", "
64 PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
67 if [ "$PLOT_LINE"x != "x" ]; then
68 echo Making clat logs $PLOT_LINE
69 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 -
73 for i in *_lat.log; do
77 PT=$(echo $i | sed s/_lat.log//g)
78 if [ "$PLOT_LINE"x != "x" ]; then
79 PLOT_LINE=$PLOT_LINE", "
82 PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines"
85 if [ "$PLOT_LINE"x != "x" ]; then
86 echo Making lat logs $PLOT_LINE
87 echo "set title 'Latency - $TITLE'; set xlabel 'time (msec)'; set ylabel 'latency (msec)'; set terminal png; set output '$TITLE-lat.png'; plot " $PLOT_LINE | $GNUPLOT -