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