forked from luyi0619/aria
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_aria_tpcc.sh
executable file
·85 lines (66 loc) · 2.64 KB
/
test_aria_tpcc.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
set +e
# num_threads=12
test_aria(){
warehouse=$1
threads=$2
dist=$3
echo "Aria|#Warehouse:$warehouse|Threads:$threads|Dist:$dist"
timeout -s SIGTSTP 10m ./bench_tpcc --logtostderr=1 --id=0 --servers="127.0.0.1:9000" --protocol=Aria --partition_num=$warehouse --threads=$threads --batch_size=500 --query=mixed --neworder_dist=$dist --payment_dist=$dist
}
test_Bohm(){
warehouse=$1
threads=$2
dist=$3
echo "Bohm|#Warehouse:$warehouse|Threads:$threads|Dist:$dist"
timeout -s SIGTSTP 10m ./bench_tpcc --logtostderr=1 --id=0 --servers="127.0.0.1:9000" --protocol=Bohm --partition_num=$warehouse --threads=$threads --batch_size=500 --query=mixed --neworder_dist=$dist --payment_dist=$dist --mvcc=True --bohm_single_spin=True --same_batch=False
}
test_Pwv(){
warehouse=$1
threads=$2
dist=$3
echo "Pwv|#Warehouse:$warehouse|Threads:$threads|Dist:$dist"
timeout -s SIGTSTP 10m ./bench_tpcc --logtostderr=1 --id=0 --servers="127.0.0.1:9000" --protocol=Pwv --partition_num=$warehouse --threads=$threads --batch_size=500 --query=mixed --neworder_dist=$dist --payment_dist=$dist --same_batch=False
}
test_Calvin(){
warehouse=$1
threads=$2
dist=$3
locks=$4
echo "Calvin|#Warehouse:$warehouse|Threads:$threads|Dist:$dist|Locks:$locks"
timeout -s SIGTSTP 10m ./bench_tpcc --logtostderr=1 --id=0 --servers="127.0.0.1:9000" --protocol=Calvin --partition_num=$warehouse --threads=$threads --batch_size=500 --query=mixed --neworder_dist=$dist --payment_dist=$dist --lock_manager=$locks --replica_group=1 --same_batch=False
}
test_ariaFB(){
warehouse=$1
threads=$2
dist=$3
locks=$4
echo "AriaFB|#Warehouse:$warehouse|Threads:$threads|Dist:$dist|Locks:$locks"
timeout -s SIGTSTP 10m ./bench_tpcc --logtostderr=1 --id=0 --servers="127.0.0.1:9000" --protocol=AriaFB --partition_num=$warehouse --threads=$threads --batch_size=500 --query=mixed --neworder_dist=$dist --payment_dist=$dist --same_batch=False --ariaFB_lock_manager=$locks
}
tpcc_all(){
wh=10
for num_threads in 1 2 4 8 12
do
for dist in {0..100..10}
do
test_aria $wh $num_threads $dist
test_Bohm $wh $num_threads $dist
test_Pwv $wh $num_threads $dist
for locks in 1 2 4 6
do
if [ $(($locks+1)) -gt $num_threads ]
then
continue
fi
test_Calvin $wh $num_threads $dist $locks
test_ariaFB $wh $num_threads $dist $locks
done
done
done
}
mkdir -p ./logs
for run in 1 2 3
do
tpcc_all 2>&1 | tee -a ./logs/tpcc_new_run${run}.out
done