fio2gnuplot: Don't plot fake data
authorErwan Velu <erwan@enovance.com>
Mon, 22 Jul 2013 10:59:04 +0000 (12:59 +0200)
committerErwan Velu <erwan@enovance.com>
Mon, 22 Jul 2013 17:39:24 +0000 (19:39 +0200)
As we did add some fake data to keep as long a possible the coherency
between all the fio files, let's ignore them when rendering.

As a consequence, we are keeping the time associated to each
performance we store instead of a single time for all performance
traces. This will increase precision while plotting.

tools/plot/fio2gnuplot.py

index 6bde99ec3f5b5397fa6458e5f2f93a4402537d1b..03ef0ddab98e1fbbf581180d2eddb514aef9f529 100755 (executable)
@@ -126,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()