From: Erwan Velu Date: Fri, 12 Jul 2013 12:24:26 +0000 (+0200) Subject: fio2gnuplot: Don't graph 3D if not enough data X-Git-Tag: fio-2.1.2~53 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=d270b8bca769c27b8c7d9635f1d301e69e4fa33a fio2gnuplot: Don't graph 3D if not enough data If the matching pattern doesn't get more than a single file, 3D plotting doesn't have any meaning and confuse gnuplot. So let's disable the 3D plotting if a single file matched the pattern. --- diff --git a/tools/plot/fio2gnuplot.py b/tools/plot/fio2gnuplot.py index c1a5cfb0..ef32ee0b 100755 --- a/tools/plot/fio2gnuplot.py +++ b/tools/plot/fio2gnuplot.py @@ -39,7 +39,8 @@ def find_file(path, pattern): def generate_gnuplot_script(fio_data_file,title,gnuplot_output_filename,mode,disk_perf): f=open("mygraph",'w') - f.write("call \'graph3D.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\'\n" % (title,gnuplot_output_filename,gnuplot_output_filename,mode)) + if len(fio_data_file) > 1: + f.write("call \'graph3D.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\'\n" % (title,gnuplot_output_filename,gnuplot_output_filename,mode)) pos=0 # Let's create a temporary file for each selected fio file