--- /dev/null
+*.dat
+*.txt
--- /dev/null
+MSGS=$(wildcard *-msgs.txt)
+
+DAT=$(MSGS:%-msgs.txt=%.dat)
+
+result: $(DAT) preprocess.m
+ ./preprocess.m $(DAT)
+
+
+%.dat: %-msgs.txt
+ awk '{print $$17}' < $< > $@
--- /dev/null
+#!/bin/bash
+
+set -x
+
+methods=${@:-rtems kernel read-write mmap-write mmapbusy-write mmapbusy-mmap readbusy-write}
+
+for method in $methods; do
+ case $method in
+ rtems) ../../rtems/gw/boot --expect '"]", sub { shift->send_slow(0.1, "startGW\n"); }' --exiton 'tasks started';;
+ kernel) ../ppc/boot -a kernelgw --exiton "Kernel GW started";;
+ read-write) ../ppc/boot --exiton "UGW started";;
+ mmap-write) ../ppc/boot -a "ugw=|-r mmap|" --exiton "UGW started";;
+ mmapbusy-write) ../ppc/boot -a "ugw=|-r mmapbusy|" --exiton "UGW started";;
+ mmapbusy-mmap) ../ppc/boot -a "ugw=|-r mmapbusy -t mmap|" --exiton "UGW started";;
+ readbusy-write) ../ppc/boot -a "ugw=|-b 300|" --exiton "UGW started";;
+ *)
+ echo >&2 "Unknown method '$method'";
+ exit 1;
+ esac
+ ssh glab "latester -d can0 -d can1 -d can2 --oneattime -c 1000 -q -n $method"
+ scp glab:"$method-*.txt" .
+ sleep 2 # Wait for cu at glab to die
+done
--- /dev/null
+set title "CAN GW routing latency"
+set xlabel "Method"
+set ylabel "GW latency [µs]"
+set style data histogram
+set style histogram
+set style fill solid border -1
+set boxwidth 0.9
+set key off
+set grid
+set xtics rotate by -20
+set style histogram errorbars gap 1 lw 1
+plot 'result' using 3:2:4:xtic(1);
--- /dev/null
+#!/usr/bin/octave -q
+## -*-octave-*-
+
+datafiles = argv();
+quantiles = [0 0.5 0.90 0.99];
+
+mat = zeros(0, length(quantiles));
+names = {};
+
+for i=1:length(argv),
+ x = load(datafiles{i})*1e6;
+ q = quantile (x, quantiles);
+ mat = [ mat; q' ];
+ [d, n, e, v] = fileparts(datafiles{i});
+ names{i} = n;
+end
+
+[mat, ind] = sortrows(mat, 2);
+result = [names(ind)', num2cell(mat)];
+cell2csv("result", result, ' ', '"');
# ifconfig eth0 192.168.2.3
# (echo boa; echo boa) | passwd
-params=$(sed -e 's/.* ugw=|\([^"]*\)|.*/\1/' /proc/cmdline)
+if grep -q kernelgw /proc/cmdline; then
+ cangw -A -s can0 -d can1
+ echo "Kernel GW started"
+ exit 0
+fi
+
+params=$(sed -ne 's/.* ugw=|\([^"]*\)|.*/\1/p' /proc/cmdline)
# mount -t debugfs none /sys/kernel/debug
# cd /sys/kernel/debug/tracing/
#!/usr/bin/env novaboot
# -*-sh-*-
-EXITON=UGW started
+#EXITON=UGW started
uImage console=ttyPSC0,115200
shark-ryu.dtb
rootfs2.uImage < $SRCDIR/mkinitramfs