From 356a65dd99e1e9a7c3c90bd57719d537aafed54d Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Tue, 30 Jul 2013 14:13:51 +0200 Subject: [PATCH] fio2gnuplot: Printing number of selected files when using pattern matching on a big set of files, it's pretty hard to estimate if we missed some or not. Let's print the number of matched items with the selected pattern to help user estimate if it's ok or not. --- tools/plot/fio2gnuplot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/plot/fio2gnuplot.py b/tools/plot/fio2gnuplot.py index eeb15db7..f68b8dea 100755 --- a/tools/plot/fio2gnuplot.py +++ b/tools/plot/fio2gnuplot.py @@ -340,10 +340,12 @@ def main(argv): if len(fio_data_file) == 0: print "No log file found with pattern %s!" % pattern sys.exit(1) + else: + print "%d files Selected with pattern '%s'" % (len(fio_data_file), pattern) fio_data_file=sorted(fio_data_file, key=str.lower) for file in fio_data_file: - print 'Selected %s' % file + print ' |-> %s' % file if "_bw.log" in file : mode="Bandwidth (KB/sec)" if "_iops.log" in file : @@ -354,6 +356,7 @@ def main(argv): if "IO" in mode: title='IO benchmark with %d fio results' % len(fio_data_file) + print #We need to adjust the output filename regarding the pattern required by the user if (pattern_set_by_user == True): gnuplot_output_filename=pattern -- 2.25.1