]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Plot frame loss and sort columns always the same
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 14 Jan 2014 13:00:35 +0000 (14:00 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 14 Jan 2014 15:03:02 +0000 (16:03 +0100)
ugw/data/plot.gp [changed mode: 0644->0755]
ugw/data/preprocess.m

old mode 100644 (file)
new mode 100755 (executable)
index ba1a4e0..0bd7fa6
@@ -1,12 +1,19 @@
-set title "CAN GW routing latency"
+#!/usr/bin/env gnuplot
+
+system("make")
+
 set xlabel "Method"
 set ylabel "GW latency [µs]"
 set xlabel "Method"
 set ylabel "GW latency [µs]"
+set y2tics
+set y2label "Lost frames"
+set y2range [0:*]
 set style data histogram
 set style histogram
 set style fill solid border -1
 set boxwidth 0.9
 set style data histogram
 set style histogram
 set style fill solid border -1
 set boxwidth 0.9
-set key off
+set key left Left reverse
 set grid
 set xtics rotate by -20
 set style histogram errorbars gap 1 lw 1
 set grid
 set xtics rotate by -20
 set style histogram errorbars gap 1 lw 1
-plot 'result' using 3:2:4:xtic(1);
+plot 'result' using 3:2:4:xtic(1) title "Latency", \
+     '' using 6:(0):(0) axes x1y2 title "Lost frames"
index 6e7b9815a4b1310dc377fc8c11cc72b0a9f2fedf..0aee1c85ed37972e7dc62c7a5172a9334c93b91e 100755 (executable)
@@ -2,19 +2,37 @@
 ## -*-octave-*-
 
 datafiles = argv();
 ## -*-octave-*-
 
 datafiles = argv();
+datafiles = {
+            "rtems.dat"
+            "kernel.dat"
+            "readnb-write.dat"
+            "mmapbusy-write.dat"
+            "mmapbusy-mmap.dat"
+            "readbusy-write.dat"
+            "read-write.dat"
+            "mmap-write.dat"
+            "mmap-mmap.dat"
+};
+
 quantiles = [0 0.5 0.90 0.99];
 
 quantiles = [0 0.5 0.90 0.99];
 
-mat = zeros(0, length(quantiles));
+mat = zeros(0, length(quantiles) + 1);
 names = {};
 
 for i=1:length(argv),
 names = {};
 
 for i=1:length(argv),
+  [d, n, e, v] = fileparts(datafiles{i});
   x = load(datafiles{i})*1e6;
   x = load(datafiles{i})*1e6;
+  stat = csv2cell([n, "-stat.txt"], '=');
+  lost = stat{6,2};
   q = quantile (x, quantiles);
   q = quantile (x, quantiles);
-  mat = [ mat; q' ];
-  [d, n, e, v] = fileparts(datafiles{i});
+  q = max(q, 0)';
+  mat = [ mat; q lost ];
   names{i} = n;
 end
 
   names{i} = n;
 end
 
-[mat, ind] = sortrows(mat, 2);
-result = [names(ind)', num2cell(mat)];
+if 0,
+  [mat, ind] = sortrows(mat, 2);
+  names = names(ind)
+end
+result = [names', num2cell(mat)];
 cell2csv("result", result, ' ', '"');
 cell2csv("result", result, ' ', '"');