From: Michal Sojka Date: Thu, 9 Dec 2010 21:33:30 +0000 (+0100) Subject: Prepare for testing under different loads X-Git-Tag: fix-allnoconfig~233^2~20 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/ee367e21f2ccb37e6593c2545658280ec815ca88 Prepare for testing under different loads --- diff --git a/gw-tests/filter-sff.sh b/gw-tests/filter-sff.sh index a57d25f..a597954 100755 --- a/gw-tests/filter-sff.sh +++ b/gw-tests/filter-sff.sh @@ -4,8 +4,11 @@ ids="0 $(seq 255 256 2047)" -main() { +prepare() { sshgw 'for i in `seq 0 2047`; do cangw -A -s can0 -d can1 -f $(printf %x $i):c00007ff; done' +} + +main() { for i in $ids; do latester -d can0 -d can1 -d can2 -c $COUNT -i $i $(traffic_and_length 2) -n id-$i done diff --git a/gw-tests/filter.sh b/gw-tests/filter.sh index 9abe307..fab50e9 100755 --- a/gw-tests/filter.sh +++ b/gw-tests/filter.sh @@ -4,8 +4,11 @@ ids="0 $(seq 255 256 2047)" -main() { +prepare() { sshgw 'for i in `seq 0 2047`; do cangw -A -s can0 -d can1 -f $(printf %x $i):7ff; done' +} + +main() { for i in $ids; do latester -d can0 -d can1 -d can2 -c $COUNT -i $i $(traffic_and_length 2) -n id-$i done diff --git a/gw-tests/lib.sh b/gw-tests/lib.sh index 14038cd..05b28d1 100644 --- a/gw-tests/lib.sh +++ b/gw-tests/lib.sh @@ -78,6 +78,12 @@ traffic_and_length() { echo $opts -l $1 } +start_load() { +} + +kill_load() { +} + _measure() { # Remove data from the last measurement rm -rf * @@ -103,8 +109,11 @@ _measure() { # Set the length of qdisc queue to avoid ENOBUFS errors ifconfig can0 txqueuelen 200 cleanupgw - + + prepare + start_load main + kill_load }