]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Add mmap-mmap test and store data in directory according to the traffic type
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 14 Jan 2014 12:59:26 +0000 (13:59 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 14 Jan 2014 15:03:02 +0000 (16:03 +0100)
ugw/data/bench-all.sh

index e11b13fb2a16f94f5552289cab628081d3d6dde8..917839202695a89a7cc3cb180224da408daad302 100755 (executable)
@@ -1,17 +1,38 @@
 #!/bin/bash
 
-set -x
 set -e
 
-methods=${@:-rtems kernel read-write readnb-write mmap-write mmapbusy-write mmapbusy-mmap readbusy-write}
+args=
+dir=burst
+d0=$(dirname $0)
+
+cd $d0
+
+while [ "${1#-}" != "$1" ]; do
+    case "$1" in
+       -o)
+           args=--oneattime
+           dir=oneatatime
+           ;;
+       -p*)
+           args=$1
+           dir=${1#-p}
+           ;;
+    esac
+    shift
+done
+
+methods=${@:-rtems kernel read-write readnb-write mmap-write mmap-mmap mmapbusy-write mmapbusy-mmap readbusy-write}
 
 for method in $methods; do
+    set -x
     case $method in
        rtems) ../../rtems/gw/boot --expect '"]", sub { shift->send_slow(0.1, "startGW\n"); }' --exiton 'tasks started';;
        kernel)         ../ppc/boot -a kernelgw --exiton "Kernel GW started";;
        read-write)     ../ppc/boot             --exiton "UGW started";;
        readnb-write)   ../ppc/boot -a "ugw=|-n|" --exiton "UGW started";;
        mmap-write)     ../ppc/boot -a "ugw=|-r mmap|" --exiton "UGW started";;
+       mmap-mmap)      ../ppc/boot -a "ugw=|-r mmap -t mmap|" --exiton "UGW started";;
        mmapbusy-write) ../ppc/boot -a "ugw=|-r mmapbusy|" --exiton "UGW started";;
        mmapbusy-mmap)  ../ppc/boot -a "ugw=|-r mmapbusy -t mmap|" --exiton "UGW started";;
        readbusy-write) ../ppc/boot -a "ugw=|-b 300|" --exiton "UGW started";;
@@ -19,7 +40,10 @@ for method in $methods; do
            echo >&2 "Unknown method '$method'";
            exit 1;
     esac
-    ssh glab "latester -d can0 -d can1 -d can2 --oneattime -c 1000 -q -n $method"
-    scp glab:"$method-*.txt" .
+    ssh glab "latester -d can0 -d can1 -d can2 -c 10000 -q -n $method $args"
+    mkdir -p $dir
+    scp glab:"$method-*.txt" $dir
+    (cd $dir && ln -sf ../Makefile ../plot.gp ../preprocess.m .)
+    set +x
     sleep 2 # Wait for cu at glab to die
 done