Flexible I/O Tester development
 help / color / mirror / Atom feed
* [Pull Request] Fixing coherency in fio2gnuplot
@ 2013-07-22 17:46 Erwan Velu
  2013-07-22 18:29 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Erwan Velu @ 2013-07-22 17:46 UTC (permalink / raw)
  To: fio

Hello,
Sorry to make many pull request in a row but I just discover a serious 
problem when plotting multiple traces at the same time. It was in fact 
shortening the plots & rendering to the smallest trace file.

This bug is pretty boring and this patch series does fix it.
The branch is on top the current master, shall be easy to merge ;o)

Thanks,
Erwan

--------

The following changes since commit 21356fee2727b71ef72b39414955c5e7e98f97c1:

   net: Add UDP multicast example job file (2013-07-22 09:04:38 -0600)

are available in the git repository at:

   git@github.com:enovance/fio.git fix_coherency

for you to fetch changes up to d7e30e61f2c1d9c6101cc6896009750aae2e2bcf:

   fio2gnuplot: Don't plot fake data (2013-07-22 19:39:24 +0200)

----------------------------------------------------------------
Erwan Velu (3):
       fio2gnuplot: Keep original filename in temp. files
       fio2gnuplot: Don't truncate fio log files
       fio2gnuplot: Don't plot fake data

  tools/plot/fio2gnuplot.py | 20 ++++++++++++++++----
  1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/tools/plot/fio2gnuplot.py b/tools/plot/fio2gnuplot.py
index ef32ee0..03ef0dd 100755
--- a/tools/plot/fio2gnuplot.py
+++ b/tools/plot/fio2gnuplot.py
@@ -91,17 +91,26 @@ 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
      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:
@@ -117,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()


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Pull Request] Fixing coherency in fio2gnuplot
  2013-07-22 17:46 [Pull Request] Fixing coherency in fio2gnuplot Erwan Velu
@ 2013-07-22 18:29 ` Jens Axboe
  2013-07-22 20:52   ` Erwan Velu
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2013-07-22 18:29 UTC (permalink / raw)
  To: Erwan Velu; +Cc: fio

On Mon, Jul 22 2013, Erwan Velu wrote:
> Hello,
> Sorry to make many pull request in a row but I just discover a serious
> problem when plotting multiple traces at the same time. It was in fact
> shortening the plots & rendering to the smallest trace file.
> 
> This bug is pretty boring and this patch series does fix it.
> The branch is on top the current master, shall be easy to merge ;o)

No worries, pulled both of them. Thanks!

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Pull Request] Fixing coherency in fio2gnuplot
  2013-07-22 18:29 ` Jens Axboe
@ 2013-07-22 20:52   ` Erwan Velu
  2013-07-22 20:58     ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Erwan Velu @ 2013-07-22 20:52 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

On 22/07/2013 20:29, Jens Axboe wrote:
> On Mon, Jul 22 2013, Erwan Velu wrote:
>> Hello,
>> Sorry to make many pull request in a row but I just discover a serious
>> problem when plotting multiple traces at the same time. It was in fact
>> shortening the plots & rendering to the smallest trace file.
>>
>> This bug is pretty boring and this patch series does fix it.
>> The branch is on top the current master, shall be easy to merge ;o)
> No worries, pulled both of them. Thanks!
>
Thanks !

Did you got the chance to had a look at it ?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Pull Request] Fixing coherency in fio2gnuplot
  2013-07-22 20:52   ` Erwan Velu
@ 2013-07-22 20:58     ` Jens Axboe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2013-07-22 20:58 UTC (permalink / raw)
  To: Erwan Velu; +Cc: fio

On 07/22/2013 02:52 PM, Erwan Velu wrote:
> On 22/07/2013 20:29, Jens Axboe wrote:
>> On Mon, Jul 22 2013, Erwan Velu wrote:
>>> Hello,
>>> Sorry to make many pull request in a row but I just discover a serious
>>> problem when plotting multiple traces at the same time. It was in fact
>>> shortening the plots & rendering to the smallest trace file.
>>>
>>> This bug is pretty boring and this patch series does fix it.
>>> The branch is on top the current master, shall be easy to merge ;o)
>> No worries, pulled both of them. Thanks!
>>
> Thanks !
> 
> Did you got the chance to had a look at it ?

The actual ouputs? No, not yet, will get around to playing with it
before the next release.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-22 20:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-22 17:46 [Pull Request] Fixing coherency in fio2gnuplot Erwan Velu
2013-07-22 18:29 ` Jens Axboe
2013-07-22 20:52   ` Erwan Velu
2013-07-22 20:58     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox