]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - 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
index ca998768077328894c8d6a0ebd25801c40d654f8..8faeeeebe02fc0b1bf70d7b7060f1bfd3d4a9dd6 100755 (executable)
@@ -3,7 +3,13 @@
 . lib.sh
 
 main() {
-       ln -s ../nop-highprio/*.txt .
+    #Check that the test wasn't skipped.
+    if [ "$(ls -A ../nop-highprio)" ]; then
+        #Otherwise this would create *.txt file and plot.sh and break the automation
+        ln -s ../nop-highprio/*.txt .
+    else
+        SKIPPED=1; return;
+    fi;
 }
 
 plot_cmds() {
@@ -13,13 +19,13 @@ set title "Single GW rule for all messages, no modifications, high (soft)irq tas
 set logscale y
 set grid xtics ytics mytics lw 1, lw 0.5
 set key left
-set xlabel "Time [s]"
-set ylabel "Latency [ms]"
-plot [:] [0.06:4] \
-          "len2-msgs.txt" using (\$2-$min):(1000*\$14) with points title "2 byte messages", \
-          "len4-msgs.txt" using (\$2-$min):(1000*\$14) with points title "4 byte messages", \
-          "len6-msgs.txt" using (\$2-$min):(1000*\$14) with points title "6 byte messages", \
-          "len8-msgs.txt" using (\$2-$min):(1000*\$14) with points title "8 byte messages"
+set xlabel "Experiment time [s]"
+set ylabel "GW latency [ms]"
+plot [:] [0.01:4] \\
+          "len2-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "2 byte messages", \\
+          "len4-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "4 byte messages", \\
+          "len6-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "6 byte messages", \\
+          "len8-msgs.txt" using (\$2-$min):(1000*\$14-0.001*\$16) with points title "8 byte messages"
 EOF
 }