]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/filter-time.sh
Modified nop-highprio tests to have plot level "detail".
[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     #Check that the test wasn't skipped.
9     if [ "$(ls -A ../filter)" ]; then
10         #Otherwise this would create *.txt file and plot.sh and break the automation
11         ln -s ../filter/*.txt .
12     else
13         SKIPPED=1; return;
14     fi;
15 }
16
17 ids="0 $(seq 255 256 2047)"
18
19 ADDITIONAL_PLOTS=detail
20
21 plot_cmds() {
22     if [[ "$1" = detail ]]; then
23         range=0:0.6
24     else
25         range=0.01:100
26         echo "set logscale y"
27     fi
28     min=$(head -n 1 id-0-msgs.txt | awk '{ print $2 }')
29     cat <<EOF
30 set title "2048 GW rules (one per id, mask 0x7FF), no modifications"
31 set grid xtics ytics mytics lw 1, lw 0.5
32 set xlabel "Experiment time [s]"
33 set ylabel "GW latency [ms]"
34 plot [:] [$range] \\
35 EOF
36     lt=1
37     for i in $ids; do
38         echo_plot "\"id-$i-msgs.txt\" using (\$2-$min):(1000*\$14-0.001*\$16) with points title \"Message id $i\""
39         lt=$((lt+1))
40     done
41 }
42     
43 test_end
44