fio2gnuplot: Printing number of selected files
authorErwan Velu <erwan@enovance.com>
Tue, 30 Jul 2013 12:13:51 +0000 (14:13 +0200)
committerErwan Velu <erwan@enovance.com>
Tue, 30 Jul 2013 12:13:51 +0000 (14:13 +0200)
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

index eeb15db7ae40fe7f58e81f3fd30b11feadcc0977..f68b8dea32de2f0407c4ab7215994ef95cf12ada 100755 (executable)
@@ -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