From 09f30f436668b56631e819a55b9fd65841780ef9 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Mon, 22 Jul 2013 12:54:39 +0200 Subject: [PATCH] fio2gnuplot: Keep original filename in temp. files It was pretty hard to understand what trace file was linked to which fio output file. This simple commit add a simpler header to inform the debugger which fio outputfile got used. --- tools/plot/fio2gnuplot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/plot/fio2gnuplot.py b/tools/plot/fio2gnuplot.py index ef32ee0b..5e32045d 100755 --- a/tools/plot/fio2gnuplot.py +++ b/tools/plot/fio2gnuplot.py @@ -91,7 +91,9 @@ 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 -- 2.25.1