]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Prepare for testing under different loads
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 9 Dec 2010 21:33:30 +0000 (22:33 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 9 Dec 2010 21:33:30 +0000 (22:33 +0100)
gw-tests/filter-sff.sh
gw-tests/filter.sh
gw-tests/lib.sh

index a57d25f2f0d12e39f226e8f32cf0921644e603a3..a597954616e4970555a87d3882d04d940ca32605 100755 (executable)
@@ -4,8 +4,11 @@
 
 ids="0 $(seq 255 256 2047)"
 
 
 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'
     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
     for i in $ids; do
        latester -d can0 -d can1 -d can2 -c $COUNT -i $i $(traffic_and_length 2) -n id-$i
     done
index 9abe307a4dddead0de7a8400cb2ac31ebab057b4..fab50e9f6b99b9aa30229eaa84a1daf3aef4d8c3 100755 (executable)
@@ -4,8 +4,11 @@
 
 ids="0 $(seq 255 256 2047)"
 
 
 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'
     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
     for i in $ids; do
        latester -d can0 -d can1 -d can2 -c $COUNT -i $i $(traffic_and_length 2) -n id-$i
     done
index 14038cd7c0d8b871b7d56e21e0228d36d953d5ed..05b28d1c22842df4cfd44a28a5de3f519bd3c1fb 100644 (file)
@@ -78,6 +78,12 @@ traffic_and_length() {
     echo $opts -l $1
 }
 
     echo $opts -l $1
 }
 
+start_load() {
+}
+
+kill_load() {
+}
+
 _measure() {
     # Remove data from the last measurement
     rm -rf *
 _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
     # Set the length of qdisc queue to avoid ENOBUFS errors
     ifconfig can0 txqueuelen 200
     cleanupgw
-    
+
+    prepare
+    start_load
     main
     main
+    kill_load
 }
 
 
 }