]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - tests/ethflood.sh
Gzip ramdisk - booting is faster
[can-benchmark.git] / tests / ethflood.sh
index e2c1edd5a1da3b3777cc5c7b069b8a0378c034a4..b5c12dc8757c2c265ad716204bd8282f5b8f9dae 100755 (executable)
@@ -3,24 +3,31 @@
 . _lib.sh
 
 t() {
-    ssh root@${SSH_CONNECTION%% *} 'ping -qf "${SSH_CONNECTION%% *}"' &
-    PID_PING=$!
-    boost_irq_prio
-    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
-    kill $PID_S
-    kill $PID_PING
+    for i in norm boost; do
+       ssh root@${SSH_CONNECTION%% *} 'ping -f "${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 0 -c $COUNT
+           kill $PID_S
+       fi
+       kill $PID_PING
+       sleep 1 # Wait for remote buffers to become empty
+    done
 }
 
 
 
-PLOT_CMD='
-set title "Round-trip time with ethenet load - ping -f (`uname -r`)"
+p() { cat <<EOF
+set title "Round-trip time with ethernet load - ping -f"
 set logscale y
 set grid
-set xlabel "Time [{/Symbol m}s]"
+set xlabel "Time [ms]"
 set ylabel "Latency profile [messages]"
-plot [0:] "socketcan-1000.dat" with lp title "Socketcan",\
-          "lincan-1000.dat" with lp title "Lincan"
-'
-
+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
+}