]> rtime.felk.cvut.cz Git - can-eth-gw.git/blob - bench/bench
Add a note
[can-eth-gw.git] / bench / bench
1 #!/bin/sh
2 N=100
3 MODE=oneattime
4 SLEEP=1
5 LOGANDPRINT="tee -a result | cut -c 2-"
6
7 modprobe canethgw
8
9 cegw --listen udp@127.0.0.1:10501
10 cegw --add -s can@vcan0 -d udp@127.0.0.1:10502
11 cegw --add -s udp@127.0.0.1:10502 -d can@vcan0
12
13 sleep $SLEEP
14 echo "#kernel udp->can: " | tee -a result | cut -c 2-
15 cegwbench -s udp@127.0.0.1:10501 -d can@vcan0 -n $N -m $MODE -t 1 >> result
16
17 sleep $SLEEP
18 echo "#kernel can->udp: " | tee -a result | cut -c 2-
19 cegwbench -s can@vcan0 -d udp@127.0.0.1:10502 -n $N -m $MODE -t 1 >> result
20
21 sleep $SLEEP
22 modprobe -r canudpgw
23 sleep 3
24 canethgw -s can@vcan0 -d udp@127.0.0.1:10502 -l udp@127.0.0.1:10501 &
25 sleep $SLEEP
26
27 echo "#user udp->can: " | tee -a result | cut -c 2-
28 cegwbench -s udp@127.0.0.1:10501 -d can@vcan0 -n $N -m $MODE -t 1 >> result
29
30 sleep $SLEEP
31 echo "#user can->udp: " | tee -a result | cut -c 2-
32 cegwbench -s can@vcan0 -d udp@127.0.0.1:10502 -n $N -m $MODE -t 1 >> result
33
34 # send result
35 cat result | nc `cat /etc/retip` 10600
36