From f9846c392d176582916c39b1925a436e79f23de1 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Mon, 22 Jul 2013 12:56:26 +0200 Subject: [PATCH] fio2gnuplot: Don't truncate fio log files 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/plot/fio2gnuplot.py b/tools/plot/fio2gnuplot.py index 5e32045d..6bde99ec 100755 --- a/tools/plot/fio2gnuplot.py +++ b/tools/plot/fio2gnuplot.py @@ -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: -- 2.25.1