]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/nop-highprio-time.sh
Modification of *-time tests so that they don't break if the test was skipped.
[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 plot_cmds() {
16     min=$(head -n 1 len2-msgs.txt | awk '{ print $2 }')
17     cat <<EOF
18 set title "Single GW rule for all messages, no modifications, high (soft)irq task priority"
19 set logscale y
20 set grid xtics ytics mytics lw 1, lw 0.5
21 set key left
22 set xlabel "Experiment time [s]"
23 set ylabel "GW latency [ms]"
24 plot [:] [0.01:4] \\
25           "len2-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "2 byte messages", \\
26           "len4-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "4 byte messages", \\
27           "len6-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "6 byte messages", \\
28           "len8-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "8 byte messages"
29 EOF
30 }
31     
32 test_end
33