Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Use gnuplot to generate plots from fio run with -l and/or -w |
| 4 | |
| 5 | if [ "$1"x == "x" ]; then |
| 6 | echo Need title as arg |
| 7 | exit 1 |
| 8 | fi |
| 9 | |
| 10 | TITLE=$1 |
| 11 | |
| 12 | PLOT_LINE="" |
| 13 | for i in *bw.log; do |
| 14 | if [ ! -r $i ]; then |
| 15 | continue |
| 16 | fi |
| 17 | if [ "$PLOT_LINE"x != "x" ]; then |
| 18 | PLOT_LINE=$PLOT_LINE", " |
| 19 | fi |
| 20 | |
| 21 | PLOT_LINE=$PLOT_LINE"'$i' with lines" |
| 22 | done |
| 23 | |
| 24 | if [ "$PLOT_LINE"x != "x" ]; then |
| 25 | echo Making bw logs |
| 26 | 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 - |
| 27 | fi |
| 28 | |
| 29 | PLOT_LINE="" |
| 30 | for i in *slat.log; do |
| 31 | if [ ! -r $i ]; then |
| 32 | continue |
| 33 | fi |
| 34 | if [ "$PLOT_LINE"x != "x" ]; then |
| 35 | PLOT_LINE=$PLOT_LINE", " |
| 36 | fi |
| 37 | |
| 38 | PLOT_LINE=$PLOT_LINE"'$i' with lines" |
| 39 | done |
| 40 | |
| 41 | if [ "$PLOT_LINE"x != "x" ]; then |
| 42 | echo Making slat logs $PLOT_LINE |
| 43 | 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 - |
| 44 | fi |
| 45 | |
| 46 | PLOT_LINE="" |
| 47 | for i in *clat.log; do |
| 48 | if [ ! -r $i ]; then |
| 49 | continue |
| 50 | fi |
| 51 | if [ "$PLOT_LINE"x != "x" ]; then |
| 52 | PLOT_LINE=$PLOT_LINE", " |
| 53 | fi |
| 54 | |
| 55 | PLOT_LINE=$PLOT_LINE"'$i' with lines" |
| 56 | done |
| 57 | |
| 58 | if [ "$PLOT_LINE"x != "x" ]; then |
| 59 | echo Making clat logs $PLOT_LINE |
| 60 | 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 - |
| 61 | fi |