]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Merge branch 'master' of rtime.felk.cvut.cz:/can-benchmark
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 1 Dec 2010 12:33:25 +0000 (13:33 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 1 Dec 2010 12:33:25 +0000 (13:33 +0100)
gw-tests/vcan.sh
gw-tests/vcans.sh [new file with mode: 0755]

index ff7b967a5f6222d40f21428a6099b451588fbf00..5d3ffe572b403b5869c7293aab704b6c7d247ad7 100755 (executable)
@@ -30,7 +30,7 @@ set logscale y
 set grid
 set xlabel "Time [{/Symbol m}s]"
 set ylabel "Latency profile [messages]"
-plot [0:1500] [1:$COUNT] \\
+plot [0:1000] [1:$COUNT] \\
 EOF
     lt=1
     for i in $numjobs; do
diff --git a/gw-tests/vcans.sh b/gw-tests/vcans.sh
new file mode 100755 (executable)
index 0000000..153529d
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+. lib.sh
+
+numjobs=`seq 1 2 10`
+
+main() {
+    for i in $numjobs; do
+       cleanupgw
+       lastif=can0
+       for j in `seq $((i-1))`; do
+           sshgw "if ! ip l show dev vcan$j >/dev/null 2>&1; then ip link add dev vcan$j type vcan && ip link set vcan$j up; fi"
+           sshgw cangw -A -s $lastif -d vcan$j -e -f $(printf %x:C00007FF $((j-1))) -m SET:I:$(printf %x $j).0.0000000000000000
+           lastif=vcan$j
+       done
+       sshgw cangw -A -s $lastif -d can1 -f $(printf %x:C00007FF $((i-1)))
+
+       latester -d can0 -d can1 -d can2 -o -c $COUNT -i 0 -h hist-$i.dat -f time-$i.dat
+    done
+}
+
+plot_cmds() {
+    cat <<EOF
+set title "Chained GWs on multiple VCAN interfaces"
+set logscale y
+set grid
+set xlabel "Time [{/Symbol m}s]"
+set ylabel "Latency profile [messages]"
+plot [0:1000] [1:$COUNT] \\
+EOF
+    lt=1
+    for i in $numjobs; do
+       echo_plot "\"hist-$i.dat\" with lp lt $lt title \"$i GW jobs\""
+        lt=$((lt+1))
+    done
+}
+
+
+test_end