summaryrefslogtreecommitdiff
path: root/db-4.8.30/test_stl/run_base_profile.sh
blob: a0c9b6f3b91e65016344889e11be25be57696add (plain)
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
#run_test.sh
run_test()
{
prog=$1 
mkdir -p ./dbenv
rm -f -r dbenv/*

echo "Auto commit btree transaction tests:" >&2
	$prog -s b -m t -t a  -T 200 -k 50 -l 100 -c 33554432 -n $total && mv gmon.out gmon${i}.out
	i=`expr $i + 1`	

echo "Transaction btree tests:" >&2
	$prog -s b -m t -t e  -T 200 -k 50 -l 100 -c 33554432 -n $total && mv gmon.out gmon${i}.out
	i=`expr $i + 1`	
echo "CDS btree tests:" >&2
	$prog -s b -m c -T 200 -k 50 -l 100 -c 33554432 -n $total && mv gmon.out gmon${i}.out
	i=`expr $i + 1`	

echo "DS btree tests:" >&2
	$prog -s b -T 200 -k 50 -l 100 -c 33554432 -n $total && mv gmon.out gmon${i}.out
	i=`expr $i + 1`	

echo "Auto commit hash transaction tests:" >&2
	$prog -s h -m t -t a  -T 200 -k 50 -l 100 -c 33554432 -n $total && mv gmon.out gmon${i}.out
	i=`expr $i + 1`	

echo "Transaction hash tests:" >&2
	$prog -s h -m t -t e  -T 200 -k 50 -l 100 -c 33554432 -n $total && mv gmon.out gmon${i}.out
	i=`expr $i + 1`	

echo "CDS hash tests:" >&2
	$prog -s h -m c -T 200 -k 50 -l 100 -c 33554432 -n $total && mv gmon.out gmon${i}.out
	i=`expr $i + 1`	

echo "DS hash tests:" >&2
	$prog -s h -T 200 -k 50 -l 100 -c 33554432 -n $total && mv gmon.out gmon${i}.out
	i=`expr $i + 1`	
}

if test $# -ne 1 ; then
	echo "Usage: sh run_test.sh number-of-run-in-a-loop"
	exit 1
fi

total=$1
i=0
os=`uname -s`

if test $os = "CYGWIN_NT-5.1" ; then
	run_test "../build_windows/Win32/Debug/test.exe"
else
	run_test "../build_unix/test_dbstl"
fi

ii=0
profiles=""

while [ $ii -lt $i ]; do
	profiles="${profiles} gmon${ii}.out"
	ii=`expr $ii + 1`	
done
echo "Generating profiling report..." >&2
gprof $1/.libs/test_dbstl $profiles > gprof.out