Fixing coherency in fio2gnuplot
Hello,
Sorry to make many pull request in a row but I just discover a serious problem when plotting multiple traces at the same time. It was in fact shortening the plots & rendering to the smallest trace file.
This bug is pretty boring and this patch series does fix it. The branch is on top the current master, shall be easy to merge ;o)
Thanks,
Erwan
--------
The following changes since commit 21356fee2727b71ef72b39414955c5e7e98f97c1:
net: Add UDP multicast example job file (2013-07-22 09:04:38 -0600)
are available in the git repository at:
[email protected]:enovance/fio.git fix_coherency
for you to fetch changes up to d7e30e61f2c1d9c6101cc6896009750aae2e2bcf:
fio2gnuplot: Don't plot fake data (2013-07-22 19:39:24 +0200)
----------------------------------------------------------------
Erwan Velu (3):
fio2gnuplot: Keep original filename in temp. files
fio2gnuplot: Don't truncate fio log files
fio2gnuplot: Don't plot fake data
tools/plot/fio2gnuplot.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-)
tools/plot/fio2gnuplot.py +10 -1
@@ -91,17 +91,26 @@ def compute_temp_file(fio_data_file,disk_perf): files.append(open(file)) pos = len(files) - 1 tmp_filename = "gnuplot_temp_file.%d" % pos - temp_outfile.append(open(tmp_filename,'w')) + gnuplot_file=open(tmp_filename,'w') + temp_outfile.append(gnuplot_file) + gnuplot_file.write("#Temporary file based on file %s\n" % file) disk_perf.append([]) shall_break = False while True: current_line=[] + nb_empty_files=0 + nb_files=len(files) for file in files: s=file.readline().replace(',',' ').split() if not s: + nb_empty_files+=1 + s="-1, 0, 0, 0'".replace(',',' ').split() + + if (nb_empty_files == nb_files): shall_break=True break; + current_line.append(s); if shall_break == True:
@@ -117,14 +126,17 @@ def compute_temp_file(fio_data_file,disk_perf): # 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):
+ if (((int(time)) > 500) or (int(time)==-1)):
disk_perf[index].append(int(perf))
- perfs.append(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):
- temp_outfile[p[0]].write("%s %.2f %s\n" % (p[0], float(float(time)/1000), p[1]))
+ perf_time,perf = p[1].split()
+ if (perf_time != "-1"):+ temp_outfile[p[0]].write("%s %.2f %s\n" % (p[0], float(float(perf_time)/1000), perf))
+
for file in files:
file.close()
Quoted 7 lines · Erwan Velu
Hello,
Sorry to make many pull request in a row but I just discover a serious problem when plotting multiple traces at the same time. It was in fact shortening the plots & rendering to the smallest trace file.This bug is pretty boring and this patch series does fix it. The branch is on top the current master, shall be easy to merge ;o)
No worries, pulled both of them. Thanks!
Signature · 1 line
Jens Axboe
Quoted 10 lines · Jens Axboe
Quoted 7 lines · Erwan Velu
Hello,
Sorry to make many pull request in a row but I just discover a serious problem when plotting multiple traces at the same time. It was in fact shortening the plots & rendering to the smallest trace file.This bug is pretty boring and this patch series does fix it. The branch is on top the current master, shall be easy to merge ;o)
No worries, pulled both of them. Thanks!
Thanks !
Did you got the chance to had a look at it ?
Quoted 7 lines · Erwan Velu
Quoted 6 lines · Jens Axboe
Quoted 5 lines · Erwan Velu
Hello,
Sorry to make many pull request in a row but I just discover a serious problem when plotting multiple traces at the same time. It was in fact shortening the plots & rendering to the smallest trace file.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
This bug is pretty boring and this patch series does fix it. The branch is on top the current master, shall be easy to merge ;o)
No worries, pulled both of them. Thanks!
Thanks !
Did you got the chance to had a look at it ?
The actual ouputs? No, not yet, will get around to playing with it before the next release.
Signature · 1 line
Jens Axboe