]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Add test for filtering SFF only messages
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 30 Nov 2010 23:04:45 +0000 (00:04 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 30 Nov 2010 23:04:45 +0000 (00:04 +0100)
gw-tests/gw-filter-sff.sh [new file with mode: 0755]
gw-tests/gw-filter.sh

diff --git a/gw-tests/gw-filter-sff.sh b/gw-tests/gw-filter-sff.sh
new file mode 100755 (executable)
index 0000000..5338376
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+. lib.sh
+
+ids=$(seq 0 256 2047)
+
+main() {
+    sshgw 'for i in `seq 0 2047`; do cangw -A -s can0 -d can1 -f $(printf %x $i):c00007ff; done'
+    for i in $ids; do
+       latester -d can0 -d can1 -d can2 -o -c $COUNT -i $i -h hist-$i.dat -f time-$i.dat
+    done
+}
+
+plot_cmds() {
+    cat <<EOF
+set title "Single GW, no modifications, 2048 filters (one per id)"
+set logscale y
+set grid
+set xlabel "Time [{/Symbol m}s]"
+set ylabel "Latency profile [messages]"
+plot [0:1500] [1:$COUNT] \\
+EOF
+    lt=1
+    for i in $ids; do
+       (( i != 0)) && echo ", \\"
+       echo -n "    " \"hist-$i.dat\" with lp lt $lt title \"Message id $i\"
+        lt=$((lt+1))
+    done
+    echo
+}
+    
+test_end
index b2be4e88f5b5baa4cd6d133c56631ceb45b1fc54..bebdc3f260e44be2f067d3d6ff0eff9317c50d5f 100755 (executable)
@@ -2,10 +2,10 @@
 
 . lib.sh
 
 
 . lib.sh
 
-ids=$(seq 0 512 4095)
+ids=$(seq 0 256 2047)
 
 main() {
 
 main() {
-    sshgw 'for i in `seq 0 4095`; do cangw -A -s can0 -d can1 -f $(printf %x $i):fff; done'
+    sshgw 'for i in `seq 0 2047`; do cangw -A -s can0 -d can1 -f $(printf %x $i):7ff; done'
     for i in $ids; do
        latester -d can0 -d can1 -d can2 -o -c $COUNT -i $i -h hist-$i.dat -f time-$i.dat
     done
     for i in $ids; do
        latester -d can0 -d can1 -d can2 -o -c $COUNT -i $i -h hist-$i.dat -f time-$i.dat
     done
@@ -13,12 +13,12 @@ main() {
 
 plot_cmds() {
     cat <<EOF
 
 plot_cmds() {
     cat <<EOF
-set title "Single GW, no modifications, 4095 filters (one per id)"
+set title "Single GW, no modifications, 2048 filters (one per id, mask 0x7FF)"
 set logscale y
 set grid
 set xlabel "Time [{/Symbol m}s]"
 set ylabel "Latency profile [messages]"
 set logscale y
 set grid
 set xlabel "Time [{/Symbol m}s]"
 set ylabel "Latency profile [messages]"
-plot [0:2000] [1:$COUNT] \\
+plot [0:1500] [1:$COUNT] \\
 EOF
     lt=1
     for i in $ids; do
 EOF
     lt=1
     for i in $ids; do