]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - tests/ethflood.sh
Merge branch 'master' of rtime.felk.cvut.cz:/can-benchmark
[can-benchmark.git] / tests / ethflood.sh
1 #!/bin/bash
2
3 . _lib.sh
4
5 t() {
6     for i in norm boost; do
7         ssh root@${SSH_CONNECTION%% *} 'ping -f "${SSH_CONNECTION%% *}"' &
8         PID_PING=$!
9         echo 0 1 > $DRIVER-$i-1000.dat
10         if [ $i != "boost" ] || boost_irq_prio 90; then
11             PID_S=`vca_canping -s 1 -b -R FF:$RTPRIO -d $CAN1`
12             vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER-$i -t 1 -d $CAN0 -w 0 -c $COUNT
13             kill $PID_S
14         fi
15         kill $PID_PING
16         sleep 1 # Wait for remote buffers to become empty
17     done
18 }
19
20
21
22 p() { cat <<EOF
23 set title "Round-trip time with ethernet load - ping -f"
24 set logscale y
25 set grid
26 set xlabel "Time [ms]"
27 set ylabel "Latency profile [messages]"
28 plot [0:] "socketcan-norm-1000.dat" with lp lt 1 title "Socketcan",\
29           "lincan-norm-1000.dat" with lp lt 2 title "Lincan",\
30           "socketcan-boost-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio",\
31           "lincan-boost-1000.dat" with lp lt 2 title "Lincan boosted IRQ prio"
32 EOF
33 }