1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#!/usr/bin/env bash
./build --release --no-debug
benchmark=$1
nodepath=${2:-node}
shift 2;
cwd=${PWD}
trap 'cd "$cwd"' EXIT
if [ "$benchmark" = "doxbee" ]; then
cd "$cwd/benchmark"
npm install
echo "Doxbee sequential"
$nodepath performance.js --n 10000 --t 1 ./doxbee-sequential/*.js --harmony "$@"
exit 0
elif [ "$benchmark" = "doxbee-errors" ]; then
cd "$cwd/benchmark"
npm install
echo "Doxbee sequential with 10% errors"
$nodepath performance.js --n 10000 --t 1 --e 0.1 ./doxbee-sequential-errors/*.js --harmony "$@"
exit 0
elif [ "$benchmark" = "parallel" ]; then
cd "$cwd/benchmark"
npm install
echo "Madeup parallel"
$nodepath performance.js --n 10000 --t 1 --p 25 ./madeup-parallel/*.js --harmony "$@"
exit 0
elif [ "$benchmark" = "analysis" ]; then
cd "$cwd/benchmark"
npm install
echo "analysis"
$nodepath performance.js --n 10000 --t 1 ./analysis/*.js --harmony "$@"
exit 0
else
echo "Invalid benchmark name $benchmark"
exit -1
fi
|