projects
/
can-benchmark.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
080e1f7
)
Allow tests to generate more graphs
author
Michal Sojka
<sojkam1@fel.cvut.cz>
Thu, 18 Jun 2009 14:58:57 +0000
(16:58 +0200)
committer
Michal Sojka
<sojkam1@fel.cvut.cz>
Thu, 18 Jun 2009 14:58:57 +0000
(16:58 +0200)
canping
patch
|
blob
|
history
tests/_lib.sh
patch
|
blob
|
history
tests/rtt-300MHz.sh
patch
|
blob
|
history
tests/rtt-overload.sh
patch
|
blob
|
history
tests/rtt-virtual-300MHz.sh
patch
|
blob
|
history
tests/rtt-virtual.sh
patch
|
blob
|
history
tests/rtt.sh
patch
|
blob
|
history
diff --git
a/canping
b/canping
index
6991851
..
e746bdc
160000
(submodule)
--- 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
(file)
--- a/
tests/_lib.sh
+++ b/
tests/_lib.sh
@@
-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() {
diff --git
a/tests/rtt-300MHz.sh
b/tests/rtt-300MHz.sh
index
aaac12a
..
e6f0913
100755
(executable)
--- a/
tests/rtt-300MHz.sh
+++ b/
tests/rtt-300MHz.sh
@@
-1,4
+1,4
@@
-#!/bin/sh
+#!/bin/
ba
sh
. _lib.sh
. _lib.sh
diff --git
a/tests/rtt-overload.sh
b/tests/rtt-overload.sh
index
52b1a97
..
e0dea53
100755
(executable)
--- a/
tests/rtt-overload.sh
+++ b/
tests/rtt-overload.sh
@@
-1,4
+1,4
@@
-#!/bin/sh
+#!/bin/
ba
sh
. _lib.sh
. _lib.sh
diff --git
a/tests/rtt-virtual-300MHz.sh
b/tests/rtt-virtual-300MHz.sh
index
951af92
..
2bac3f6
100755
(executable)
--- a/
tests/rtt-virtual-300MHz.sh
+++ b/
tests/rtt-virtual-300MHz.sh
@@
-1,4
+1,4
@@
-#!/bin/sh
+#!/bin/
ba
sh
. _lib.sh
. _lib.sh
diff --git
a/tests/rtt-virtual.sh
b/tests/rtt-virtual.sh
index
a057e28
..
52b87b3
100755
(executable)
--- a/
tests/rtt-virtual.sh
+++ b/
tests/rtt-virtual.sh
@@
-1,4
+1,4
@@
-#!/bin/sh
+#!/bin/
ba
sh
. _lib.sh
. _lib.sh
diff --git
a/tests/rtt.sh
b/tests/rtt.sh
index
0b78118
..
898fb56
100755
(executable)
--- a/
tests/rtt.sh
+++ b/
tests/rtt.sh
@@
-1,10
+1,10
@@
-#!/bin/sh
+#!/bin/
ba
sh
. _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
+'