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.
diff --git a/tools/plot/fio2gnuplot.py b/tools/plot/fio2gnuplot.py
index eeb15db..f68b8de 100755
--- a/tools/plot/fio2gnuplot.py
+++ b/tools/plot/fio2gnuplot.py
@@ -340,10 +340,12 @@
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 @@
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