]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/filter-time.sh
Fix a few bugs in scripts
[can-benchmark.git] / gw-tests / filter-time.sh
1 #!/bin/bash
2
3 . lib.sh
4
5 NO_GW_NEEDED=true
6
7 main() {
8         ln -s ../filter/*.txt .
9 }
10
11 ids="0 $(seq 255 256 2047)"
12
13 ADDITIONAL_PLOTS=detail
14
15 plot_cmds() {
16     if [[ "$1" = detail ]]; then
17         range=0.36:0.8
18     else
19         range=0.05:100
20         echo "set logscale y"
21     fi
22     min=$(head -n 1 id-0-msgs.txt | awk '{ print $2 }')
23     cat <<EOF
24 set title "2048 GW rules (one per id, mask 0x7FF), no modifications"
25 set grid xtics ytics mytics lw 1, lw 0.5
26 set xlabel "Time [s]"
27 set ylabel "Latency [ms]"
28 plot [:] [$range] \\
29 EOF
30     lt=1
31     for i in $ids; do
32         echo_plot "\"id-$i-msgs.txt\" using (\$2-$min):(1000*\$14) with points title \"Message id $i\""
33         lt=$((lt+1))
34     done
35 }
36     
37 test_end
38