forked from petkaantonov/bluebird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbench
34 lines (32 loc) · 929 Bytes
/
bench
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
#!/usr/bin/bash
benchmark=$1
cwd=${PWD}
trap 'cd "$cwd"' EXIT
if [ "$benchmark" = "doxbee" ]; then
cd "$cwd/benchmark"
npm install
echo "Doxbee sequential"
node 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"
node 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"
node 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"
node performance.js --n 5000 --t 1 ./analysis/*.js --harmony
exit 0
else
echo "Invalid benchmark name $benchmark"
exit -1
fi