]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - ugw/data/bench-all.sh
917839202695a89a7cc3cb180224da408daad302
[can-benchmark.git] / ugw / data / bench-all.sh
1 #!/bin/bash
2
3 set -e
4
5 args=
6 dir=burst
7 d0=$(dirname $0)
8
9 cd $d0
10
11 while [ "${1#-}" != "$1" ]; do
12     case "$1" in
13         -o)
14             args=--oneattime
15             dir=oneatatime
16             ;;
17         -p*)
18             args=$1
19             dir=${1#-p}
20             ;;
21     esac
22     shift
23 done
24
25 methods=${@:-rtems kernel read-write readnb-write mmap-write mmap-mmap mmapbusy-write mmapbusy-mmap readbusy-write}
26
27 for method in $methods; do
28     set -x
29     case $method in
30         rtems) ../../rtems/gw/boot --expect '"]", sub { shift->send_slow(0.1, "startGW\n"); }' --exiton 'tasks started';;
31         kernel)         ../ppc/boot -a kernelgw --exiton "Kernel GW started";;
32         read-write)     ../ppc/boot             --exiton "UGW started";;
33         readnb-write)   ../ppc/boot -a "ugw=|-n|" --exiton "UGW started";;
34         mmap-write)     ../ppc/boot -a "ugw=|-r mmap|" --exiton "UGW started";;
35         mmap-mmap)      ../ppc/boot -a "ugw=|-r mmap -t mmap|" --exiton "UGW started";;
36         mmapbusy-write) ../ppc/boot -a "ugw=|-r mmapbusy|" --exiton "UGW started";;
37         mmapbusy-mmap)  ../ppc/boot -a "ugw=|-r mmapbusy -t mmap|" --exiton "UGW started";;
38         readbusy-write) ../ppc/boot -a "ugw=|-b 300|" --exiton "UGW started";;
39         *)
40             echo >&2 "Unknown method '$method'";
41             exit 1;
42     esac
43     ssh glab "latester -d can0 -d can1 -d can2 -c 10000 -q -n $method $args"
44     mkdir -p $dir
45     scp glab:"$method-*.txt" $dir
46     (cd $dir && ln -sf ../Makefile ../plot.gp ../preprocess.m .)
47     set +x
48     sleep 2 # Wait for cu at glab to die
49 done