-
Notifications
You must be signed in to change notification settings - Fork 0
/
benchmark-all.sh
executable file
·46 lines (35 loc) · 961 Bytes
/
benchmark-all.sh
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
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
set -e
. ./config.sh
function collect {
local name=$1
./collect-results.sh $name
echo "Collected $name:"
./result_summary $name
}
function run_all {
echo "=== Benchmarking $SERVER with RF=$RF CL=$CL DURATION=$DURATION ==="
local date=$(date +%Y-%m-%d-%T)
echo "=== Starting write-only benchmark ==="
./restart-$SERVER-fresh.sh
./start-write.sh
collect $SERVER-write-rf$RF-cl-$CL-$date
echo "=== Starting read-only benchmark ==="
./restart-$SERVER-fresh.sh
./start-read.sh
collect $SERVER-read-rf$RF-cl-$CL-$date
echo "=== Starting mixed benchmark ==="
./restart-$SERVER-fresh.sh
./start-mixed.sh
collect $SERVER-mixed-rf$RF-cl-$CL-$date
./stop-$SERVER.sh
}
export RF=${RF:-1}
export CL=${CL:-ONE}
export DURATION=${DURATION:-15m}
export SERVER=${SERVER:-none}
if [ $SERVER == none ]; then
echo "SERVER env variable must be set"
exit 1
fi
run_all