From: Michal Sojka Date: Thu, 18 Jun 2009 14:58:57 +0000 (+0200) Subject: Allow tests to generate more graphs X-Git-Tag: fix-allnoconfig~380 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/18b079e64d91a8e6f04c717ab2b32a30d08b70a9?ds=sidebyside Allow tests to generate more graphs --- diff --git a/canping b/canping index 6991851..e746bdc 160000 --- a/canping +++ b/canping @@ -1 +1 @@ -Subproject commit 6991851c166330d9dd36cc88cbb1ef839f5c0c7c +Subproject commit e746bdc0fa1b65c87d0f9e87e2bd5d202ea72de3 diff --git a/tests/_lib.sh b/tests/_lib.sh index 557602f..281ddf9 100644 --- a/tests/_lib.sh +++ b/tests/_lib.sh @@ -79,13 +79,14 @@ run_tests() { } 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 - echo "set terminal x11 enhanced; $PLOT_CMD" | gnuplot -persist + echo "set terminal x11 enhanced; ${PLOT_CMD[$i]}" | gnuplot -persist 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() { diff --git a/tests/rtt-300MHz.sh b/tests/rtt-300MHz.sh index aaac12a..e6f0913 100755 --- a/tests/rtt-300MHz.sh +++ b/tests/rtt-300MHz.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash . _lib.sh diff --git a/tests/rtt-overload.sh b/tests/rtt-overload.sh index 52b1a97..e0dea53 100755 --- a/tests/rtt-overload.sh +++ b/tests/rtt-overload.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash . _lib.sh diff --git a/tests/rtt-virtual-300MHz.sh b/tests/rtt-virtual-300MHz.sh index 951af92..2bac3f6 100755 --- a/tests/rtt-virtual-300MHz.sh +++ b/tests/rtt-virtual-300MHz.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash . _lib.sh diff --git a/tests/rtt-virtual.sh b/tests/rtt-virtual.sh index a057e28..52b87b3 100755 --- a/tests/rtt-virtual.sh +++ b/tests/rtt-virtual.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash . _lib.sh diff --git a/tests/rtt.sh b/tests/rtt.sh index 0b78118..898fb56 100755 --- a/tests/rtt.sh +++ b/tests/rtt.sh @@ -1,10 +1,10 @@ -#!/bin/sh +#!/bin/bash . _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 } @@ -20,3 +20,11 @@ plot [0:] "socketcan-1000.dat" with lp title "Socketcan",\ "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 +'