]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - ugw/data/bench-all.sh
Add remaining uncommitted files
[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         -ftrace)
18             args=--oneattime
19             dir=oneatatime.ftrace
20             ;;
21         -p*)
22             args=$1
23             dir=${1#-p}
24             ;;
25     esac
26     shift
27 done
28
29 methods=${@:-rtems kernel read-write readnb-write mmap-write mmap-mmap mmapbusy-write mmapbusy-mmap readbusy-write}
30
31 for method in $methods; do
32     set -x
33     case $method in
34         rtems) ../../rtems/gw/boot --expect '"]", sub { shift->send_slow(0.1, "startGW\n"); }' --exiton 'tasks started';;
35         kernel)         ../ppc/boot -a kernelgw --exiton "Kernel GW started";;
36         read-write)     ../ppc/boot             --exiton "UGW started";;
37         readnb-write)   ../ppc/boot -a "ugw=|-n|" --exiton "UGW started";;
38         mmap-write)     ../ppc/boot -a "ugw=|-r mmap|" --exiton "UGW started";;
39         mmap-mmap)      ../ppc/boot -a "ugw=|-r mmap -t mmap|" --exiton "UGW started";;
40         mmapbusy-write) ../ppc/boot -a "ugw=|-r mmapbusy|" --exiton "UGW started";;
41         mmapbusy-mmap)  ../ppc/boot -a "ugw=|-r mmapbusy -t mmap|" --exiton "UGW started";;
42         readbusy-write) ../ppc/boot -a "ugw=|-b 300|" --exiton "UGW started";;
43         *)
44             echo >&2 "Unknown method '$method'";
45             exit 1;
46     esac
47     ssh glab "latester -d can0 -d can1 -d can2 -c 10000 -q -n $method $args"
48     mkdir -p $dir
49     scp glab:"$method-*.txt" $dir
50     (cd $dir && ln -sf ../Makefile ../plot.gp ../preprocess.m .)
51     set +x
52     sleep 2 # Wait for cu at glab to die
53 done