]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - gw-tests/filter.sh
Strip gw- prefix from gw-test scripts
[can-benchmark.git] / gw-tests / filter.sh
diff --git a/gw-tests/filter.sh b/gw-tests/filter.sh
new file mode 100755 (executable)
index 0000000..757f328
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+. lib.sh
+
+ids=$(seq 0 256 2047)
+
+main() {
+    sshgw 'for i in `seq 0 2047`; do cangw -A -s can0 -d can1 -f $(printf %x $i):7ff; done'
+    for i in $ids; do
+       latester -d can0 -d can1 -d can2 -o -c $COUNT -i $i -h hist-$i.dat -f time-$i.dat
+    done
+}
+
+plot_cmds() {
+    cat <<EOF
+set title "Single GW, no modifications, 2048 filters (one per id, mask 0x7FF)"
+set logscale y
+set grid
+set xlabel "Time [{/Symbol m}s]"
+set ylabel "Latency profile [messages]"
+plot [0:1500] [1:$COUNT] \\
+EOF
+    lt=1
+    for i in $ids; do
+       echo_plot "\"hist-$i.dat\" with lp lt $lt title \"Message id $i\""
+        lt=$((lt+1))
+    done
+}
+    
+test_end