]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - ugw/data/bench-all.sh
We need more data
[can-benchmark.git] / ugw / data / bench-all.sh
index 3577981ab3fae852141c3f1951b0a1e2bf2a733e..78e560af82c08c7a760263cb9a1156ceacae4fe8 100755 (executable)
@@ -1,24 +1,75 @@
 #!/bin/bash
 
-set -x
 set -e
 
-methods=${@:-rtems kernel read-write mmap-write mmapbusy-write mmapbusy-mmap readbusy-write}
+args=
+dirs=burst
+d0=$(dirname $0)
+
+cd $d0
+
+while [ "${1#-}" != "$1" ]; do
+    case "$1" in
+       -o)
+           args=--oneattime
+           dirs=oneatatime
+           ;;
+       -ftrace)
+           args=--oneattime
+           dirs=oneatatime.ftrace
+           ;;
+       -p)
+           dirs=($(seq 120 160))
+           declare -a args
+           for i in ${!dirs[*]}; do
+               args[$i]=-p${dirs[$i]}
+           done
+           ;;
+       -p*)
+           args=$1
+           dir=${1#-p}
+           ;;
+    esac
+    shift
+done
+
+methods=${@:-rtems kernel read-write readnb-write readnb-mmap read-mmap mmap-write mmap-mmap mmapbusy-write mmapbusy-mmap readbusy-write readbusynoirq-write}
 
+set -x
 for method in $methods; do
     case $method in
-       rtems) ../../rtems/gw/boot --expect '"]", sub { shift->send_slow(0.1, "startGW\n"); }' --exiton 'tasks started';;
+       rtems) ../../rtems/gw/boot --expect-raw '"]", 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";;
+       readnb-mmap)    ../ppc/boot -a "ugw=|-n -t mmap|" --exiton "UGW started";;
+       read-mmap)      ../ppc/boot -a "ugw=|-t mmap|" --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";;
+       readbusynoirq-write) ../ppc/boot -a "ugw=|-b 300|" --kernel uImage.noirq --exiton "UGW started";;
        *)
            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" .
+    set +x
+    for i in ${!dirs[*]}; do
+       arg=${args[$i]}
+       dir=${dirs[$i]}
+       set -x
+       ssh glab "sudo ip l set eth0 down; sudo ~/bin/latester -d can0 -d can1 -d can2 -c 5000 -q -n $method $arg; r=\$?; sudo ip l set eth0 up; exit \$r"
+       mkdir -p $dir
+       scp glab:"$method-*.txt" $dir
+       (cd $dir && ln -sf ../Makefile ../plot.gp ../preprocess.m .)
+       set -x
+    done
     sleep 2 # Wait for cu at glab to die
 done
+
+if [ ${#dirs[*]} -gt 1 ]; then
+    for d in ${dirs[@]}; do
+       make -C $d
+    done
+fi