]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Add remaining uncommitted files
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 15 Jan 2014 13:03:53 +0000 (14:03 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 15 Jan 2014 13:03:53 +0000 (14:03 +0100)
recvmmsg/plot.gp
ugw/bench.sh
ugw/data/bench-all.sh
ugw/data/plot-ftrace.gp [new file with mode: 0755]
ugw/data/plot-thr-detail.gp [new file with mode: 0644]
ugw/data/plot-thr.gp [new file with mode: 0755]
ugw/data/plot.gp
ugw/data/preprocess.m
ugw/data/throughput-dep.sh [new file with mode: 0755]

index 3e0f6dd0bca61f4360100c9893add98c9409be38..19e18b4124d951a7fecbdeb7c66aa789e6241804 100644 (file)
@@ -1,16 +1,22 @@
+# termsize 7cm,7cm
 set grid
 
-set xlabel "Number of messages"
-set ylabel "Time [{/Symbol m}s]"
+set xlabel "Frames [×1000]"
+set ylabel "Time [ms]"
 set key left reverse Left
 
 fit a1*x+b1 "data" using 1:2 via a1, b1
 fit a2*x+b2 "data" using 1:4 via a2, b2
 
-plot 'data' using 1:2 pt 7 ps 0.2 title 'read()', \
-     'data' using 1:4 pt 7 ps 0.2 title 'recvmmsg()', \
-     a1*x+b1 with lines lt 1 lc 1 lw 1 title "Linear fit for read()", \
-     a2*x+b2 with lines lt 1 lc 2 lw 1 title "Linear fit for recvmmsg()"
+set yrange [0:]
+
+b1=b1/1000
+b2=b2/1000
+
+plot 'data' using ($1/1000):($2/1000) title 'read()', \
+     'data' using ($1/1000):($4/1000) title 'recvmmsg()', \
+     a1*x+b1 with lines lt 1 lc rgbcolor "#aa0000" lw 5 title "", \
+     a2*x+b2 with lines lt 1 lc rgbcolor "#00aa00" lw 5 title ""
 
 # a1*x+b1 - a2*x-b2 = 0
 # (a1-a2)*x = b2-b1
index 7d43453dd5adcace780d022b46f6b94a3f154c44..a24d6c2a662df7b3a2fa15723f6280624dc4a4d7 100755 (executable)
@@ -4,7 +4,7 @@ set -e
 
 #./ppc/boot
 
-ssh glab "latester -d can0 -d can1 -d can2 --oneattime -c 1000 -q -n ugw"
+ssh glab "latester -d can0 -d can1 -d can2 -c 10000 -n ugw -p 60 -v"
 scp glab:ugw-hist.txt .
 
 gnuplot <<'EOF'
index 917839202695a89a7cc3cb180224da408daad302..3048da73c5063c6c53796c4be86df16d1f752103 100755 (executable)
@@ -14,6 +14,10 @@ while [ "${1#-}" != "$1" ]; do
            args=--oneattime
            dir=oneatatime
            ;;
+       -ftrace)
+           args=--oneattime
+           dir=oneatatime.ftrace
+           ;;
        -p*)
            args=$1
            dir=${1#-p}
diff --git a/ugw/data/plot-ftrace.gp b/ugw/data/plot-ftrace.gp
new file mode 100755 (executable)
index 0000000..641ac03
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/env gnuplot
+
+set xlabel "GW implementation"
+set ylabel "GW latency [µs]"
+set style data histogram
+set style histogram
+set style fill solid border -1
+set boxwidth 0.9
+set key left Left reverse
+set grid
+set xtics rotate by -20
+set style histogram errorbars gap 1 lw 1
+
+plot 'oneatatime/result' using 3:2:4:xtic(1) title "no ftrace", \
+     'oneatatime.ftrace/result' using 3:2:4:xtic(1) lc 1 lt 1 fill pattern 2 title "ftrace compiled in"
diff --git a/ugw/data/plot-thr-detail.gp b/ugw/data/plot-thr-detail.gp
new file mode 100644 (file)
index 0000000..dbc1257
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/env gnuplot
+set title "Detail of the above"
+set xlabel "Frame period [µs]"
+set ylabel "Latency [µs] + packet loss"
+set style data yerrorlines
+# set yrange [0:10000]
+set yrange [0:500]
+#set logscale y
+# set key left Left reverse
+set grid
+loss_scale=10
+plot \
+     'kernel.dat' using 1:2:($3*loss_scale) title 'kernel', \
+     'mmapbusy-mmap.dat' using 1:2:($3*loss_scale) title 'mmapbusy-mmap', \
+     'mmapbusy-write.dat' using 1:2:($3*loss_scale) title 'mmapbusy-write', \
+     'mmap-mmap.dat' using 1:2:($3*loss_scale) title 'mmap-mmap', \
+     'mmap-write.dat' using 1:2:($3*loss_scale) title 'mmap-write'
+#     'readbusy-write.dat' using 1:2:($3*loss_scale) title 'readbusy-write', \
+#     'readnb-write.dat' using 1:2:($3*loss_scale) title 'readnb-write', \
+#     'read-write.dat' using 1:2:($3*loss_scale) title 'read-write'
diff --git a/ugw/data/plot-thr.gp b/ugw/data/plot-thr.gp
new file mode 100755 (executable)
index 0000000..693aaa4
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/env gnuplot
+reset
+set xlabel "Frame period [µs]"
+set ylabel "Latency [µs] + packet loss"
+set style data yerrorlines
+# set yrange [0:10000]
+set yrange [0:]
+#set logscale y
+# set key left Left reverse
+set grid
+loss_scale=10
+plot \
+     'kernel.dat' using 1:2:($3*loss_scale) title 'kernel', \
+     'mmapbusy-mmap.dat' using 1:2:($3*loss_scale) title 'mmapbusy-mmap', \
+     'mmapbusy-write.dat' using 1:2:($3*loss_scale) title 'mmapbusy-write', \
+     'mmap-mmap.dat' using 1:2:($3*loss_scale) title 'mmap-mmap', \
+     'mmap-write.dat' using 1:2:($3*loss_scale) title 'mmap-write', \
+     'readbusy-write.dat' using 1:2:($3*loss_scale) title 'readbusy-write', \
+     'readnb-write.dat' using 1:2:($3*loss_scale) title 'readnb-write', \
+     'read-write.dat' using 1:2:($3*loss_scale) title 'read-write'
index 0bd7fa62fedc86d7eb11e200b593401aa3fde10d..27be572817fd70e107fa41824b6aca514a611dbb 100755 (executable)
@@ -2,7 +2,7 @@
 
 system("make")
 
-set xlabel "Method"
+set xlabel "GW implementation"
 set ylabel "GW latency [µs]"
 set y2tics
 set y2label "Lost frames"
index 0aee1c85ed37972e7dc62c7a5172a9334c93b91e..bd6f7684626dcff0c5fbdebab5c165cf29d6364e 100755 (executable)
@@ -5,9 +5,9 @@ datafiles = argv();
 datafiles = {
             "rtems.dat"
             "kernel.dat"
-            "readnb-write.dat"
-            "mmapbusy-write.dat"
             "mmapbusy-mmap.dat"
+            "mmapbusy-write.dat"
+            "readnb-write.dat"
             "readbusy-write.dat"
             "read-write.dat"
             "mmap-write.dat"
@@ -16,7 +16,7 @@ datafiles = {
 
 quantiles = [0 0.5 0.90 0.99];
 
-mat = zeros(0, length(quantiles) + 1);
+mat = zeros(0, length(quantiles) + 2);
 names = {};
 
 for i=1:length(argv),
@@ -26,7 +26,8 @@ for i=1:length(argv),
   lost = stat{6,2};
   q = quantile (x, quantiles);
   q = max(q, 0)';
-  mat = [ mat; q lost ];
+  avg = mean(x);
+  mat = [ mat; q lost avg ];
   names{i} = n;
 end
 
diff --git a/ugw/data/throughput-dep.sh b/ugw/data/throughput-dep.sh
new file mode 100755 (executable)
index 0000000..ee13f8f
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+
+titles=$(awk '{print $1}' 150/result)
+
+for t in $titles; do
+    exec > $t.dat
+    for i in $(seq 125 5 170); do
+       echo "$i $(awk "/$t/ { print \$3, \$6 }" $i/result)"
+    done
+done