[PATCH] Add support for zoned io sections
[fio.git] / fio_generate_plots
CommitLineData
ebac4655
JA
1#!/bin/bash
2
3# Use gnuplot to generate plots from fio run with -l and/or -w
4
5if [ "$1"x == "x" ]; then
6 echo Need title as arg
7 exit 1
8fi
9
10TITLE=$1
11
12PLOT_LINE=""
13for 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"
22done
23
24if [ "$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 -
27fi
28
29PLOT_LINE=""
30for 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"
39done
40
41if [ "$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 -
44fi
45
46PLOT_LINE=""
47for 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"
56done
57
58if [ "$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 -
61fi