rtt-history is a separate test (with plot cmd only)
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Aug 2009 17:42:03 +0000 (19:42 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Aug 2009 17:42:03 +0000 (19:42 +0200)
tests/00-rtt.sh [moved from tests/rtt.sh with 100% similarity]
tests/01-rtt-history.sh [new file with mode: 0755]
tests/_lib.sh
tests/ethflood64k-w2.sh [new file with mode: 0755]

similarity index 100%
rename from tests/rtt.sh
rename to tests/00-rtt.sh
diff --git a/tests/01-rtt-history.sh b/tests/01-rtt-history.sh
new file mode 100755 (executable)
index 0000000..23d0a4a
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+. _lib.sh
+
+t() {
+    # Data are reused from 'rtt' test
+    true
+}
+
+p() { cat <<EOF
+set title "Round-trip time history"
+set logscale y
+set grid
+set xlabel "Ping number"
+set ylabel "Round-trip time [{/Symbol m}s]"
+plot "../00-rtt/socketcan-times-1000.dat" with lines, "../00-rtt/lincan-times-1000.dat" with lines
+EOF
+}
index 0df9d91..3009a88 100644 (file)
@@ -121,16 +121,16 @@ create_dirs_and_links() {
     local kver=$2
     local clck=$3
 
-    local  d=results/by-test/$test/$kver/$clck
+    local  d=results/by-kern/$kver/$clck/$test
     mkdir -p $d
-    mkdir -p results/by-test/$test/$clck # 1
-    mkdir -p results/by-kern/$kver/$clck # 2
-    mkdir -p results/by-kern/$kver/$test # 3
+    mkdir -p results/by-kern/$kver/$test # 1
+    mkdir -p results/by-test/$test/$kver # 2
+    mkdir -p results/by-test/$test/$clck # 3
     mkdir -p results/by-clck/$clck/$kver # 4
     mkdir -p results/by-clck/$clck/$test # 5
-    ln -sfT ../../../${d#results/} results/by-test/$test/$clck/$kver # 1
-    ln -sfT ../../../${d#results/} results/by-kern/$kver/$clck/$test # 2
-    ln -sfT ../../../${d#results/} results/by-kern/$kver/$test/$clck # 3
+    ln -sfT ../../../${d#results/} results/by-kern/$kver/$test/$clck # 1
+    ln -sfT ../../../${d#results/} results/by-test/$test/$kver/$clck # 2
+    ln -sfT ../../../${d#results/} results/by-test/$test/$clck/$kver # 3
     ln -sfT ../../../${d#results/} results/by-clck/$clck/$kver/$test # 4
     ln -sfT ../../../${d#results/} results/by-clck/$clck/$test/$kver # 5
     echo $d
diff --git a/tests/ethflood64k-w2.sh b/tests/ethflood64k-w2.sh
new file mode 100755 (executable)
index 0000000..5e044e8
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+. _lib.sh
+
+t() {
+    for i in norm boost; do
+       ssh root@${SSH_CONNECTION%% *} 'ping -fs 64000 ${SSH_CONNECTION%% *}' &
+       PID_PING=$!
+       echo 0 1 > $DRIVER-$i-1000.dat
+       if [ $i != "boost" ] || boost_irq_prio 90; then
+           PID_S=`vca_canping -s 1 -b -R FF:$RTPRIO -d $CAN1`
+           vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER-$i -t 1 -d $CAN0 -w 2 -c $COUNT
+           kill $PID_S
+       fi
+       kill $PID_PING
+    done
+}
+
+
+
+p() { cat <<EOF
+set title "Round-trip time with ethernet load (ping -fs 64000) 2ms wait between sends"
+set logscale y
+set grid
+set xlabel "Time [{/Symbol m}s]"
+set ylabel "Latency profile [messages]"
+plot [0:] "socketcan-norm-1000.dat" with lp lt 1 title "Socketcan",\
+          "lincan-norm-1000.dat" with lp lt 2 title "Lincan",\
+          "socketcan-boost-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio",\
+          "lincan-boost-1000.dat" with lp lt 2 title "Lincan boosted IRQ prio"
+EOF
+}