fio2gnuplot: Adding filename as title for 2D graphs
authorErwan Velu <erwan@enovance.com>
Wed, 31 Jul 2013 10:32:40 +0000 (12:32 +0200)
committerErwan Velu <erwan@enovance.com>
Wed, 31 Jul 2013 10:32:40 +0000 (12:32 +0200)
While plotting 2D graphs, it's pretty handy to keep the filename as
title for the plotting trace. This way, the png file still keep the
original filename used for plotting.

tools/plot/fio2gnuplot.py

index b5f70a0983dcaf68d04f09ab5df948a7be03f92b..800c334bdb70e0670dc7796b760b1d2bacdbfe23 100755 (executable)
@@ -98,7 +98,7 @@ set yrange [0:]
                 smooth_filename = "%s-2Dsmooth" % (png_file)
                 trend_filename = "%s-2Dtrend" % (png_file)
                 avg  = average(disk_perf[pos])
                 smooth_filename = "%s-2Dsmooth" % (png_file)
                 trend_filename = "%s-2Dtrend" % (png_file)
                 avg  = average(disk_perf[pos])
-                f.write("call \'%s/graph2D.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\' \'%s\' \'%s\' \'%f\'\n" % (gpm_dir,title,tmp_filename,raw_filename,mode,smooth_filename,trend_filename,avg))
+                f.write("call \'%s/graph2D.gpm\' \'%s' \'%s\' \'%s\' \'%s\' \'%s\' \'%s\' \'%s\' \'%f\'\n" % (gpm_dir,title,tmp_filename,fio_data_file[pos],raw_filename,mode,smooth_filename,trend_filename,avg))
                 pos = pos +1
 
        # Plotting comparing graphs doesn't have a meaning unless if there is at least 2 traces
                 pos = pos +1
 
        # Plotting comparing graphs doesn't have a meaning unless if there is at least 2 traces