From: Erwan Velu Date: Mon, 22 Jul 2013 10:56:26 +0000 (+0200) Subject: fio2gnuplot: Don't truncate fio log files X-Git-Tag: fio-2.1.2~30 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=f9846c392d176582916c39b1925a436e79f23de1;ds=sidebyside 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. --- 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: