X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio_generate_plots;h=611f49fc0eec2e812a4df79c181d595820986286;hp=4e2cb08e1045a75a83a8d5a88c7113a2a3153136;hb=05463816cb6944649ac152283a9d02629ff91c0d;hpb=b22989b9f9349b3c1d1c41846ab27ff0914bd6de diff --git a/fio_generate_plots b/fio_generate_plots index 4e2cb08e..611f49fc 100755 --- a/fio_generate_plots +++ b/fio_generate_plots @@ -1,8 +1,8 @@ -#!/bin/bash +#! /bin/sh # Use gnuplot to generate plots from fio run with -l and/or -w -if [ "$1"x == "x" ]; then +if [ "$1"x = "x" ]; then echo Need title as arg exit 1 fi @@ -68,3 +68,21 @@ 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 - fi + +PLOT_LINE="" +for i in *_lat.log; do + if [ ! -r $i ]; then + continue + fi + PT=$(echo $i | sed s/_lat.log//g) + if [ "$PLOT_LINE"x != "x" ]; then + PLOT_LINE=$PLOT_LINE", " + fi + + PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines" +done + +if [ "$PLOT_LINE"x != "x" ]; then + echo Making lat logs $PLOT_LINE + 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 - +fi