]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/filterlen.sh
Fix line breaks in plot commands
[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     lastid=0
11     for i in $ids; do
12         sshgw "for i in \$(seq $lastid $i); do cangw -A -s can0 -d can1 -f \$(printf %x \$i):7ff; done"
13         lastid=$((i+1))
14         latester -d can0 -d can1 -d can2 -c $COUNT -i 0 $(traffic_and_length 2) -n len-$i
15     done
16 }
17
18 ADDITIONAL_PLOTS=log
19
20 plot_cmds() {
21     if [[ "$1" = "" ]]; then
22         range=0.0:0.8
23         echo "set logscale y"
24     else
25         range=0.01:100
26         echo "set logscale xy"
27     fi
28     cat <<EOF
29 set title "Different lengths of filter list, only the last one matches"
30 set grid xtics mxtics ytics mytics lw 1, lw 0.5
31 set xlabel "Time [ms]"
32 set ylabel "Latency profile [messages]"
33 plot [$range] [1:$COUNT] \\
34 EOF
35     lt=1
36     for i in $ids; do
37         echo_plot "\"len-$i-hist.txt\" with lp lt $lt title \"List length $((i+1))\""
38         lt=$((lt+1))
39     done
40 }
41     
42 test_end