-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbenchmark.sh
executable file
·51 lines (45 loc) · 1.24 KB
/
benchmark.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
#!/bin/bash
###############################################
# Run intensive benchmark tests from here #
###############################################
declare -i thresholds=0;
declare -i lines=100;
declare -i maxlines=101;
declare -i times=20;
declare -i cores=1;
step=0.01;
thresholdStart=0.8;
testData="./labels_en.nt"
testDataUrl="http://downloads.dbpedia.org/3.9/en/labels_en.nt.bz2"
if [ $# -eq 1 ]
then
if [ ${1} == "--info" ]
then
printf "Usage: \t ./benchmark.sh \$lines \$maxlines \$thresholdStart \$steps \$times \$cores \n";
exit;
fi
fi
if [ $# -ge 6 ]
then
declare -i lines=${1};
declare -i maxlines=${2};
thresholdStart=${3};
step=${4};
declare -i times=${5};
declare -i cores=${6};
fi
gradle downloadTestData -P testData=${testData} -P testDataUrl=${testDataUrl};
while [ ${lines} -lt ${maxlines} ]
do
thresholds=0
threshold=${thresholdStart}
while [ ${thresholds} -lt ${times} ]
do
gradle cleanTest;
gradle test -P threshold=${threshold} -P lines=${lines} -P testData=${testData} -P cores=${cores}
threshold=`echo "$threshold + $step" | bc`
thresholds=thresholds+1;
chmod -R 777 ./benchmarks
done;
lines=`echo "$lines * 10" | bc`
done;