]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/filterlen.sh
Adds RTEMS target to makefile and associated Python scripts.
[can-benchmark.git] / gw-tests / filterlen.sh
1 #!/bin/bash
2
3 . lib.sh
4
5 ids="0 $(seq 127 128 2047)"
6
7
8 main() {
9     if [ "$kvers" = 3.0.4-rt14-00008-gb2052fd -a "$load" = eth -a $traffic != oneatatime ]; then echo "Skipping eth test"; SKIPPED=1; return; fi
10     if [ "$kvers" = 3.4.33-rt47-00004-gc58c9ae -a "$load" = eth -a $traffic != oneatatime ]; then echo "Skipping eth test"; SKIPPED=1; return; fi
11     lastid=0
12     for i in $ids; do
13         sshgw "for i in \$(seq $lastid $i); do cangw -A -s can0 -d can1 -f \$(printf %x \$i):7ff; done"
14         lastid=$((i+1))
15         latester -d can0 -d can1 -d can2 -c $COUNT -i 0 $(traffic_and_length 2) -n len-$i
16     done
17 }
18
19 ADDITIONAL_PLOTS=log
20
21 plot_cmds() {
22     if [[ "$1" = "" ]]; then
23         range=0.0:0.8
24         echo "set logscale y"
25     else
26         range=0.01:100
27         echo "set logscale xy"
28     fi
29     cat <<EOF
30 set title "Different lengths of filter list, only the last one matches"
31 set grid xtics mxtics ytics mytics lw 1, lw 0.5
32 set xlabel "GW latency [ms]"
33 set ylabel "Latency profile [frames]"
34 plot [$range] [1:$COUNT] \\
35 EOF
36     lt=1
37     for i in $ids; do
38         echo_plot "\"len-$i-hist.txt\" with lp lt $lt title \"List length $((i+1))\""
39         lt=$((lt+1))
40     done
41 }
42     
43 test_end