]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - tests/ethflood.sh
rtt-history is a separate test (with plot cmd only)
[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     done
17 }
18
19
20
21 p() { cat <<EOF
22 set title "Round-trip time with ethernet load - ping -f"
23 set logscale y
24 set grid
25 set xlabel "Time [{/Symbol m}s]"
26 set ylabel "Latency profile [messages]"
27 plot [0:] "socketcan-norm-1000.dat" with lp lt 1 title "Socketcan",\
28           "lincan-norm-1000.dat" with lp lt 2 title "Lincan",\
29           "socketcan-boost-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio",\
30           "lincan-boost-1000.dat" with lp lt 2 title "Lincan boosted IRQ prio"
31 EOF
32 }