]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/gw-filter.sh
Add test for filters
[can-benchmark.git] / gw-tests / gw-filter.sh
1 #!/bin/bash
2
3 . lib.sh
4
5 main() {
6     sshgw 'for i in `seq 0 127`; do cangw -A -s can0 -d can1 -f $i:fff; done'
7     for i in `seq 0 20 127`; do
8         latester -d can0 -d can1 -d can2 -o -c $COUNT -i $i -h hist-$i.dat -f time-$i.dat
9     done
10 }
11
12 plot_cmds() {
13     cat <<EOF
14 set title "Single GW, no modifications, 127 filters (one per id)"
15 set logscale y
16 set grid
17 set xlabel "Time [{/Symbol m}s]"
18 set ylabel "Latency profile [messages]"
19 plot [0:] [1:$COUNT] \
20           "hist-0.dat" with lp lt 1 title "Message id 0", \
21           "hist-20.dat" with lp lt 2 title "Message id 20", \
22           "hist-40.dat" with lp lt 3 title "Message id 40", \
23           "hist-60.dat" with lp lt 4 title "Message id 60", \
24           "hist-80.dat" with lp lt 5 title "Message id 80", \
25           "hist-100.dat" with lp lt 6 title "Message id 100", \
26           "hist-120.dat" with lp lt 7 title "Message id 120"
27 EOF
28 }
29     
30 test_end
31