]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/vcan.sh
Update plotting -- not finished
[can-benchmark.git] / gw-tests / vcan.sh
1 #!/bin/bash
2
3 . lib.sh
4
5 numjobs=`seq 0 2 12`
6
7 main() {
8     sshgw 'ip link add dev vcan0 type vcan && ip link set vcan0 up'
9     for i in $numjobs; do
10         cleanupgw
11         sshgw cangw -A -s can0 -d vcan0 -e -f 0:C00007FF
12         for j in `seq $i`; do
13             sshgw cangw -A -s vcan0 -d vcan0 -e -f $(printf %x:C00007FF $((j-1))) -m SET:I:$(printf %x $j).0.0000000000000000
14         done
15         sshgw cangw -A -s vcan0 -d can1 -f $(printf %x:C00007FF $i)
16
17         latester -d can0 -d can1 -d can2 -c $COUNT -i 0 -h hist-$i.dat -f time-$i.dat
18     done
19     sshgw ip link del dev vcan0
20 }
21
22 plot_cmds() {
23     cat <<EOF
24 set title "Chained GW jobs on a signle VCAN interface"
25 set logscale y
26 set grid
27 set xlabel "Time [{/Symbol m}s]"
28 set ylabel "Latency profile [messages]"
29 plot [0:10000] [1:$COUNT] \\
30 EOF
31     lt=2
32     for i in $numjobs; do
33         echo_plot "\"hist-$i.dat\" with lp lt $lt title \"$((i+2)) GW jobs, 1 vcan\""
34         lt=$((lt+1))
35     done
36 }
37
38
39 test_end