From 9246de7c51e4e6be526cc1c9eecdeffccc0dd4c0 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 26 Oct 2005 11:20:36 +0200 Subject: [PATCH] [PATCH] fio: add script for generating gnuplot png's from the data --- generate_fio_plots | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 generate_fio_plots diff --git a/generate_fio_plots b/generate_fio_plots new file mode 100755 index 0000000..c8e02cd --- /dev/null +++ b/generate_fio_plots @@ -0,0 +1,40 @@ +#!/bin/bash + +# Use gnuplot to generate plots from fio run with -l and/or -w + +if [ "$1"x == "x" ]; then + echo Need title as arg + exit 1 +fi + +TITLE=$1 + +PLOT_LINE="" +for i in *bw.log; do + if [ "$PLOT_LINE"x != "x" ]; then + PLOT_LINE=$PLOT_LINE", " + fi + + PLOT_LINE=$PLOT_LINE"'$i' with lines" +done + +if [ "$PLOT_LINE"x == "x" ]; then + exit 0 +fi + +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 - + +PLOT_LINE="" +for i in *lat.log; do + if [ "$PLOT_LINE"x != "x" ]; then + PLOT_LINE=$PLOT_LINE", " + fi + + PLOT_LINE=$PLOT_LINE"'$i' with lines" +done + +if [ "$PLOT_LINE"x == "x" ]; then + exit 0 +fi + +echo "set title 'Bandwidth - $TITLE'; set xlabel 'time (msec)'; set ylabel 'KiB/sec'; set terminal png; set output '$TITLE-lat.png'; plot " $PLOT_LINE | gnuplot - -- 2.25.1