return fio_data_file
-def generate_gnuplot_script(title,gnuplot_output_filename,mode):
+def generate_gnuplot_script(fio_data_file,title,gnuplot_output_filename,mode,disk_perf):
f=open("mygraph",'w')
f.write("call \'graph3D.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\'\n" % (title,gnuplot_output_filename,gnuplot_output_filename,mode))
+
+ pos=0
+ # Let's create a temporary file for each selected fio file
+ for file in fio_data_file:
+ tmp_filename = "gnuplot_temp_file.%d" % pos
+ png_file=file.replace('.log','')
+ raw_filename = "%s-2Draw" % (png_file)
+ smooth_filename = "%s-2Dsmooth" % (png_file)
+ trend_filename = "%s-2Dtrend" % (png_file)
+ avg = average(disk_perf[pos])
+ f.write("call \'graph2D.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\' \'%s\' \'%s\' \'%f\'\n" % (title,tmp_filename,raw_filename,mode,smooth_filename,trend_filename,avg))
+ pos = pos +1
+
f.close()
def generate_gnuplot_math_script(title,gnuplot_output_filename,mode,average):
title="%s @ Blocksize = %dK" % (title,blk_size/1024)
compute_aggregated_file(fio_data_file, gnuplot_output_filename)
compute_math(fio_data_file,title,gnuplot_output_filename,mode,disk_perf)
- generate_gnuplot_script(title,gnuplot_output_filename,mode)
+ generate_gnuplot_script(fio_data_file,title,gnuplot_output_filename,mode,disk_perf)
if (run_gnuplot==True):
render_gnuplot()
--- /dev/null
+# This Gnuplot file has been generated by eNovance
+
+set title '$0'
+
+set terminal png size 1280,1024
+set output '$3.png'
+#set terminal x11
+
+#Preparing Axes
+#set logscale x
+set ytics axis out 0,5
+#set data style lines
+set key top left reverse
+set xlabel "Time (Seconds)"
+set ylabel '$4'
+set xrange [0:]
+set yrange [0:]
+
+#Set Color style
+#set palette rgbformulae 22,9,23
+#set palette rgbformulae 7,5,15
+set style line 100 lt 7 lw 0.5
+set style line 1 lt 1 lw 3 pt 3 linecolor rgb "green"
+
+plot '$1' using 2:3 with linespoints title '$2', $7 w l ls 1 ti 'Global average value'
+
+set output '$5.png'
+plot '$1' using 2:3 smooth csplines title '$2', $7 w l ls 1 ti 'Global average value'
+
+set output '$6.png'
+plot '$1' using 2:3 smooth bezier title '$2', $7 w l ls 1 ti 'Global average value'
+
+#pause -1
+#The End