forked from utsaslab/RECIPE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mt_crash_test.sh
executable file
·98 lines (88 loc) · 2.22 KB
/
mt_crash_test.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Enter output directory name and keytype[string | randint]"
exit 1
fi
run_name=$1
key_type=$2
DIR='results_crash_test'$run_name
rm -rf ./results/$DIR
error=0
mkdir -p ./results/$DIR
cd ./CLHT
bash compile.sh lb
cd ..
mkdir ./build
cd ./build
rm -rf *
cmake ..
make -j
cd ..
if [ "$key_type" == "string" ]; then
#for index in art hot masstree bwtree fastfair
for index in fastfair art hot masstree bwtree
do
for crash in 1
do
for threads in 16
do
for load_size in 100 1000 10000
do
for run_size in 10000
do
for workload in a
do
for i in {1..1000}
do
./build/mtcrash ${index} ${workload} string uniform ${threads} ${load_size} ${run_size} ${crash} &>> ./results/${DIR}/${index}${crash}.log 2>&1
status=$?
if [ $status == 1 ]; then
((error++))
fi
if [ $status == 124 ]; then
((error++))
fi
done
done
done
done
done
echo "Total errors = " $error >> ./results/${DIR}/${index}${crash}.log
echo "Total errors for " $index " with crash test is " $error
error=0
done
done
elif [ "$key_type" == "randint" ]; then
for index in cceh clht
do
for crash in 1
do
for threads in 16
do
for load_size in 100 1000 10000
do
for run_size in 10000
do
for workload in a
do
for i in {1..1000}
do
timeout 0.5s ./build/mtcrash ${index} ${workload} randint uniform ${threads} ${load_size} ${run_size} ${crash} &>> ./results/${DIR}/${index}${crash}.log 2>&1
status=$?
if [ $status == 1 ]; then
((error++))
fi
if [ $status == 124 ]; then
((error++))
fi
done
done
done
done
done
echo "Total errors = " $error >> ./results/${DIR}/${index}${crash}.log
echo "Total errors for " $index " with crash test is " $error
error=0
done
done
fi