]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Allow tests to generate more graphs
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 18 Jun 2009 14:58:57 +0000 (16:58 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 18 Jun 2009 14:58:57 +0000 (16:58 +0200)
canping
tests/_lib.sh
tests/rtt-300MHz.sh
tests/rtt-overload.sh
tests/rtt-virtual-300MHz.sh
tests/rtt-virtual.sh
tests/rtt.sh

diff --git a/canping b/canping
index 6991851c166330d9dd36cc88cbb1ef839f5c0c7c..e746bdc0fa1b65c87d0f9e87e2bd5d202ea72de3 160000 (submodule)
--- a/canping
+++ b/canping
@@ -1 +1 @@
-Subproject commit 6991851c166330d9dd36cc88cbb1ef839f5c0c7c
+Subproject commit e746bdc0fa1b65c87d0f9e87e2bd5d202ea72de3
index 557602f677cf3dcbb7987ae1d801af53deb2b894..281ddf90e87e08f2cfb253d6f721e96f52dd95f1 100644 (file)
@@ -79,13 +79,14 @@ run_tests() {
 }
 
 plot() {
 }
 
 plot() {
-    if [ -n "$PLOT_CMD" ]; then
-       echo "set terminal postscript color eps enhanced;
-             $PLOT_CMD" | gnuplot | epstopdf --filter > `basename $0 .sh`.pdf
+    for i in "${!PLOT_CMD[@]}"; do
        if [ -z "$OPT_PDF_ONLY" ]; then
        if [ -z "$OPT_PDF_ONLY" ]; then
-           echo "set terminal x11 enhanced; $PLOT_CMD" | gnuplot -persist
+           echo "set terminal x11 enhanced; ${PLOT_CMD[$i]}" | gnuplot -persist
        fi
        fi
-    fi
+       I=${i/0/}
+       echo "set terminal postscript color eps enhanced;
+             ${PLOT_CMD[$i]}" | gnuplot | epstopdf --filter > `basename $0 .sh`$I.pdf
+    done
 }
 
 go() {
 }
 
 go() {
index aaac12a1b7c82530574ff20d4906f46b9bf33a11..e6f09131416038612d274752ca4a33c784c60d53 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . _lib.sh
 
 
 . _lib.sh
 
index 52b1a97599f8a049fb29d70f57f0e3b7d6952f3b..e0dea5362d770c83d76d36d9643b192ae2592a10 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . _lib.sh
 
 
 . _lib.sh
 
index 951af92f6d8bf43f1c1e7a7528af0e669473bac7..2bac3f654fb121771dfa032a3c3107d653508c88 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . _lib.sh
 
 
 . _lib.sh
 
index a057e2867cb2fec90d835da52de958c2e9fb8c6b..52b87b322d351c8d8f46ac1ada1f7dbcdfa48a21 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . _lib.sh
 
 
 . _lib.sh
 
index 0b781188fbfa02705f1b8530868a5b6b05738ad1..898fb565810ff95d6bf3531092cc2f2399b97fe0 100755 (executable)
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/bin/bash
 
 . _lib.sh
 
 t() {
     PID_S=`vca_canping -s 1 -b -R FF:$RTPRIO -d $CAN1`
 
 . _lib.sh
 
 t() {
     PID_S=`vca_canping -s 1 -b -R FF:$RTPRIO -d $CAN1`
-    vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER -t 1 -d $CAN0 -w 2 -c 10000
+    vca_canping -m 1 -R FF:$RTPRIO -v -e $DRIVER-times -g $DRIVER -t 1 -d $CAN0 -w 1 -n 10 -c 10000
     kill $PID_S
 }
 
     kill $PID_S
 }
 
@@ -20,3 +20,11 @@ plot [0:] "socketcan-1000.dat" with lp title "Socketcan",\
           "lincan-1000.dat" with lp title "Lincan"
 '
 
           "lincan-1000.dat" with lp title "Lincan"
 '
 
+PLOT_CMD[1]='
+set title "Round-trip time history (`uname -r`)"
+set logscale y
+set grid
+set xlabel "Ping number"
+set ylabel "Round-trip time [{/Symbol m}s]"
+plot "lincan-times-1000.dat" with lines, "socketcan-times-1000.dat" with lines
+'