From: Erwan Velu Date: Wed, 7 Aug 2013 11:28:58 +0000 (+0200) Subject: fio2gnuplot: Adding verbose option X-Git-Tag: fio-2.1.3~21 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=649d301149e32811db4330c9a9c63142faa07bbb;ds=sidebyside fio2gnuplot: Adding verbose option Reducing default's verbosity and add a -v option to increase it. This avoids flooding end-users and let an option for thoses who need to get a complete trace. --- diff --git a/tools/plot/fio2gnuplot.py b/tools/plot/fio2gnuplot.py index b2530e0a..a678cdf6 100755 --- a/tools/plot/fio2gnuplot.py +++ b/tools/plot/fio2gnuplot.py @@ -39,7 +39,7 @@ def find_file(path, pattern): return fio_data_file def generate_gnuplot_script(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir): - print "Generating rendering scripts" + if verbose: print "Generating rendering scripts" filename=gnuplot_output_dir+'mygraph' f=open(filename,'w') @@ -118,7 +118,7 @@ def generate_gnuplot_math_script(title,gnuplot_output_filename,mode,average,gnup f.close() def compute_aggregated_file(fio_data_file, gnuplot_output_filename, gnuplot_output_dir): - print "Processing data file 2/2" + if verbose: print "Processing data file 2/2" temp_files=[] pos=0 @@ -145,7 +145,7 @@ def compute_temp_file(fio_data_file,disk_perf,gnuplot_output_dir, min_time, max_ end_time=max_time if end_time == -1: end_time="infinite" - print "Processing data file 1/2 with %s 1: - print " |-> Rendering comparing traces" + if verbose: print " |-> Rendering comparing traces" os.system("cd %s; for i in *.gnuplot; do gnuplot $i; done" % gnuplot_output_dir) - print " |-> Rendering math traces" + if verbose: print " |-> Rendering math traces" os.system("cd %s; gnuplot mymath" % gnuplot_output_dir) - print " |-> Rendering 2D & 3D traces" + if verbose: print " |-> Rendering 2D & 3D traces" os.system("cd %s; gnuplot mygraph" % gnuplot_output_dir) name_of_directory="the current" @@ -360,6 +360,7 @@ def print_help(): print ' - The .global extension is added automatically to the pattern' print '-m or --min_time