]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - ugw/data/bench-all.sh
e11b13fb2a16f94f5552289cab628081d3d6dde8
[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 readnb-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         readnb-write)   ../ppc/boot -a "ugw=|-n|" --exiton "UGW started";;
14         mmap-write)     ../ppc/boot -a "ugw=|-r mmap|" --exiton "UGW started";;
15         mmapbusy-write) ../ppc/boot -a "ugw=|-r mmapbusy|" --exiton "UGW started";;
16         mmapbusy-mmap)  ../ppc/boot -a "ugw=|-r mmapbusy -t mmap|" --exiton "UGW started";;
17         readbusy-write) ../ppc/boot -a "ugw=|-b 300|" --exiton "UGW started";;
18         *)
19             echo >&2 "Unknown method '$method'";
20             exit 1;
21     esac
22     ssh glab "latester -d can0 -d can1 -d can2 --oneattime -c 1000 -q -n $method"
23     scp glab:"$method-*.txt" .
24     sleep 2 # Wait for cu at glab to die
25 done