]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/nop-highprio-time.sh
3712cb7e2ea23ba09c37e5fa054c9d4f7a31e948
[can-benchmark.git] / gw-tests / nop-highprio-time.sh
1 #!/bin/bash
2
3 . lib.sh
4
5 main() {
6     #Check that the test wasn't skipped.
7     if [ "$(ls -A ../nop-highprio)" ]; then
8         #Otherwise this would create *.txt file and plot.sh and break the automation
9         ln -s ../nop-highprio/*.txt .
10     else
11         SKIPPED=1; return;
12     fi;
13 }
14
15 ADDITIONAL_PLOTS=detail
16
17 plot_cmds() {
18     if [[ "$1" = detail ]]; then
19         range=0.0:0.3
20     else
21         range=0.01:4
22         echo "set logscale y"
23     fi
24     min=$(head -n 1 len2-msgs.txt | awk '{ print $2 }')
25     cat <<EOF
26 set title "Single GW rule for all messages, no modifications, high (soft)irq task priority"
27 set logscale y
28 set grid xtics ytics mytics lw 1, lw 0.5
29 set key left
30 set xlabel "Experiment time [s]"
31 set ylabel "GW latency [ms]"
32 plot [:] [$range] \\
33           "len2-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "2 byte messages", \\
34           "len4-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "4 byte messages", \\
35           "len6-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "6 byte messages", \\
36           "len8-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "8 byte messages"
37 EOF
38 }
39     
40 test_end
41