-def compute_temp_file(fio_data_file,disk_perf,gnuplot_output_dir):
- print "Processing data file 1/2"
+def compute_temp_file(fio_data_file,disk_perf,gnuplot_output_dir, min_time, max_time):
+ end_time=max_time
+ if end_time == -1:
+ end_time="infinite"
+ print "Processing data file 1/2 with %s<time<%s" % (min_time,end_time)
# We ignore the first 500msec as it doesn't seems to be part of the real benchmark
# Time < 500 usually reports BW=0 breaking the min computing
if (((int(time)) > 500) or (int(time)==-1)):
# We ignore the first 500msec as it doesn't seems to be part of the real benchmark
# Time < 500 usually reports BW=0 breaking the min computing
if (((int(time)) > 500) or (int(time)==-1)):
- disk_perf[index].append(int(perf))
- perfs.append("%s %s"% (time, perf))
- index = index + 1
+ # Now it's time to estimate if the data we got is part of the time range we want to plot
+ if ((int(time)>(int(min_time)*1000)) and ((int(time) < (int(max_time)*1000)) or max_time=="-1")):
+ disk_perf[index].append(int(perf))
+ perfs.append("%s %s"% (time, perf))
+ index = index + 1
# If we reach this point, it means that all the traces are coherent
for p in enumerate(perfs):
# If we reach this point, it means that all the traces are coherent
for p in enumerate(perfs):
print
print '-h --help : Print this help'
print '-p <pattern> or --pattern <pattern> : A pattern in regexp to select fio input files'
print
print '-h --help : Print this help'
print '-p <pattern> or --pattern <pattern> : A pattern in regexp to select fio input files'
print '-G or --Global <type> : Search for <type> in .global files match by a pattern'
print ' - Available types are : min, max, avg, stddev'
print ' - The .global extension is added automatically to the pattern'
print '-G or --Global <type> : Search for <type> in .global files match by a pattern'
print ' - Available types are : min, max, avg, stddev'
print ' - The .global extension is added automatically to the pattern'
os.makedirs(gnuplot_output_dir)
elif opt in ("-t", "--title"):
title=arg
os.makedirs(gnuplot_output_dir)
elif opt in ("-t", "--title"):
title=arg
elif opt in ("-g", "--gnuplot"):
run_gnuplot=True
elif opt in ("-G", "--Global"):
elif opt in ("-g", "--gnuplot"):
run_gnuplot=True
elif opt in ("-G", "--Global"):
- blk_size=compute_temp_file(fio_data_file,disk_perf,gnuplot_output_dir)
+ blk_size=compute_temp_file(fio_data_file,disk_perf,gnuplot_output_dir,min_time,max_time)
title="%s @ Blocksize = %dK" % (title,blk_size/1024)
compute_aggregated_file(fio_data_file, gnuplot_output_filename, gnuplot_output_dir)
compute_math(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir)
title="%s @ Blocksize = %dK" % (title,blk_size/1024)
compute_aggregated_file(fio_data_file, gnuplot_output_filename, gnuplot_output_dir)
compute_math(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir)