]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - tests/ethload.sh
Gzip ramdisk - booting is faster
[can-benchmark.git] / tests / ethload.sh
index a5e57f6570a152dda017e63826e03a2b7d129b11..61e7ce829e9b88515c39c3100dc42436dfd2ff83 100755 (executable)
@@ -4,27 +4,40 @@
 
 t() {
     for i in norm boost; do
-       ssh root@${SSH_CONNECTION%% *} 'find -L /usr/src/linux -type f -exec cat "{}" ";"' > /dev/null &
-       PID_LOAD=$!
-       [ $i == "boost" ] && boost_irq_prio 90
-       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 10000
-       kill $PID_S
-       kill $PID_LOAD
+       for budget in 300 1 1000; do
+           echo $budget > /proc/sys/net/core/netdev_budget
+           ssh root@${SSH_CONNECTION%% *} 'find -L /usr/src/linux -type f -exec cat "{}" ";"' > /dev/null &
+           PID_LOAD=$!
+           echo 0 1 > $DRIVER-$i-$budget-1000.dat
+           if [ $budget -eq 300 -o $DRIVER == "socketcan" ]; then
+               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-$budget -t 1 -d $CAN0 -w 0 -c $COUNT
+                   kill $PID_S
+               fi
+           fi
+           kill $PID_LOAD
+           sleep 1 # Wait for remote buffers to become empty
+       done
     done
 }
 
 
 
-PLOT_CMD='
-set title "Round-trip time with receive ethenet load (`uname -r`)"
+p() { cat <<EOF
+set title "Round-trip time with receive ethernet load (TCP)"
 set logscale y
 set grid
-set xlabel "Time [{/Symbol m}s]"
+set xlabel "Time [ms]"
 set ylabel "Latency profile [messages]"
-plot [0:] "socketcan-norm-1000.dat" with lp title "Socketcan",\
-          "lincan-norm-1000.dat" with lp title "Lincan",\
-          "socketcan-boost-1000.dat" with lp title "Socketcan boosted IRQ prio",\
-          "lincan-boost-1000.dat" with lp title "Lincan boosted IRQ prio"
-'
-
+plot [0:] \
+          "socketcan-norm-300-1000.dat" with lp lt 1 title "Socketcan",\
+          "lincan-norm-300-1000.dat" with lp lt 2 title "Lincan",\
+          "socketcan-boost-300-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio",\
+          "lincan-boost-300-1000.dat" with lp lt 2 title "Lincan boosted IRQ prio",\
+          "socketcan-norm-1-1000.dat" with lp lt 1 title "Socketcan netdev\\\\_budget=1",\
+          "socketcan-boost-1-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio, netdev\\\\_budget=1",\
+          "socketcan-norm-1000-1000.dat" with lp lt 1 title "Socketcan, netdev\\\\_budget=1000",\
+          "socketcan-boost-1000-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio, netdev\\\\_budget=1000"
+EOF
+}