]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - ugw/data/bench-all.sh
Stop on error
[can-benchmark.git] / ugw / data / bench-all.sh
1 #!/bin/bash
2
3 set -x
4 set -e
5
6 methods=${@:-rtems kernel read-write mmap-write mmapbusy-write mmapbusy-mmap readbusy-write}
7
8 for method in $methods; do
9     case $method in
10         rtems) ../../rtems/gw/boot --expect '"]", sub { shift->send_slow(0.1, "startGW\n"); }' --exiton 'tasks started';;
11         kernel)         ../ppc/boot -a kernelgw --exiton "Kernel GW started";;
12         read-write)     ../ppc/boot             --exiton "UGW started";;
13         mmap-write)     ../ppc/boot -a "ugw=|-r mmap|" --exiton "UGW started";;
14         mmapbusy-write) ../ppc/boot -a "ugw=|-r mmapbusy|" --exiton "UGW started";;
15         mmapbusy-mmap)  ../ppc/boot -a "ugw=|-r mmapbusy -t mmap|" --exiton "UGW started";;
16         readbusy-write) ../ppc/boot -a "ugw=|-b 300|" --exiton "UGW started";;
17         *)
18             echo >&2 "Unknown method '$method'";
19             exit 1;
20     esac
21     ssh glab "latester -d can0 -d can1 -d can2 --oneattime -c 1000 -q -n $method"
22     scp glab:"$method-*.txt" .
23     sleep 2 # Wait for cu at glab to die
24 done