]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/filterlenshort.sh
Add test for PC vs. CANalyzer comparison
[can-benchmark.git] / gw-tests / filterlenshort.sh
1 #!/bin/bash
2
3 . lib.sh
4
5 ids="$(seq 0 20 300)"
6
7
8 main() {
9     lastid=0
10     for i in $ids; do
11         sshgw "for i in \$(seq $lastid $i); do cangw -A -s can0 -d can1 -f \$(printf %x \$i):7ff; done"
12         lastid=$((i+1))
13         latester -d can0 -d can1 -d can2 -c $COUNT -i 0 $(traffic_and_length 2) -n len-$i
14     done
15 }
16
17 ADDITIONAL_PLOTS=log
18
19 plot_cmds() {
20     if [[ "$1" = "" ]]; then
21         range=0.1:0.3
22         echo "set logscale y"
23     else
24         range=0.05:100
25         echo "set logscale xy"
26     fi
27     cat <<EOF
28 set title "Different lengths of filter list, only the last one matches"
29 set grid xtics mxtics ytics mytics lw 1, lw 0.5
30 set xlabel "Time [ms]"
31 set ylabel "Latency profile [messages]"
32 plot [$range] [1:$COUNT] \\
33 EOF
34     lt=1
35     for i in $ids; do
36         echo_plot "\"len-$i-hist.txt\" with lp lt $lt title \"List length $((i+1))\""
37         lt=$((lt+1))
38     done
39 }
40     
41 test_end