fio2gnuplot: Don't truncate fio log files
authorErwan Velu <erwan@enovance.com>
Mon, 22 Jul 2013 10:56:26 +0000 (12:56 +0200)
committerErwan Velu <erwan@enovance.com>
Mon, 22 Jul 2013 17:39:24 +0000 (19:39 +0200)
The code was stopping at reading once the shorter stopped. But in the
case of a very big difference of performances between hosts, some could
be much longer/shorter than others.

This patch does insure that until _all_ input files got read complety we
do had fake data with a negative time.

This way, all the traces will be complete as per fio's output.

tools/plot/fio2gnuplot.py

index 5e32045..6bde99e 100755 (executable)
@@ -99,11 +99,18 @@ def compute_temp_file(fio_data_file,disk_perf):
        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: