]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/filter.sh
Fix generation of pdf graphs
[can-benchmark.git] / gw-tests / filter.sh
1 #!/bin/bash
2
3 . lib.sh
4
5 ids="0 $(seq 255 256 2047)"
6
7 prepare() {
8     sshgw 'for i in `seq 0 2047`; do cangw -A -s can0 -d can1 -f $(printf %x $i):7ff; done'
9 }
10
11 main() {
12     for i in $ids; do
13         latester -d can0 -d can1 -d can2 -c $COUNT -i $i $(traffic_and_length 2) -n id-$i
14     done
15 }
16
17 plot_cmds() {
18     cat <<EOF
19 set title "2048 GW jobs (one per id, mask 0x7FF), no modifications"
20 set logscale xy
21 set grid xtics mxtics ytics mytics lw 1, lw 0.5
22 set xlabel "Time [ms]"
23 set ylabel "Latency profile [messages]"
24 plot [0.1:100] [1:$COUNT] \\
25 EOF
26     lt=1
27     for i in $ids; do
28         echo_plot "\"id-$i-hist.txt\" with lp lt $lt title \"Message id $i\""
29         lt=$((lt+1))
30     done
31 }
32     
33 test_end