-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun_benchmarks.sh
More file actions
executable file
·84 lines (71 loc) · 2.4 KB
/
run_benchmarks.sh
File metadata and controls
executable file
·84 lines (71 loc) · 2.4 KB
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
# usage: extract and convert the cfg-analyzer benchmarks using the python script in the same directory (convert_cfg.py)
# put them in the respecive test directory or change the locations below
for f in `find c/test/grammars/cfg-analyzer-benchmarks/benchmarks -name '*.cfg'`
do
echo $f
echo "sl-nopt:"
timeout 15s ./c/src/newton -f $f --slset --scc > ${f}_log_slset_nonopt
if [ $? -ne 0 ]; then
#!= 0 signals a timeout or that sth else is wrong
echo "TIMEOUT"
echo "TIMEOUT: 999111999 ms" >> ${f}_log_slset_nonopt
fi
echo "sl-opt:"
timeout 15s ./c/src/newton -f $f --slset --lin-simpl --scc > ${f}_log_slset_simpl
if [ $? -ne 0 ]; then
#!= 0 signals a timeout or that sth else is wrong
echo "TIMEOUT"
echo "TIMEOUT: 999111999 ms" >> ${f}_log_slset_simpl
fi
echo "ml-nopt:"
timeout 15s ./c/src/newton -f $f --mlset --scc > ${f}_log_mlset_nonopt
if [ $? -ne 0 ]; then
#!= 0 signals a timeout or that sth else is wrong
echo "TIMEOUT"
echo "TIMEOUT: 999111999 ms" >> ${f}_log_mlset_nonopt
fi
echo "ml-opt:"
timeout 15s ./c/src/newton -f $f --mlset --vec-simpl --scc > ${f}_log_mlset_simpl
if [ $? -ne 0 ]; then
#!= 0 signals a timeout or that sth else is wrong
echo "TIMEOUT"
echo "TIMEOUT: 999111999 ms" >> ${f}_log_mlset_simpl
fi
done
rm runtimes_*_*_*.log
for f in `find c/test/grammars/cfg-analyzer-benchmarks -name *_log_slset_nonopt*`
do
runtime_ms=`grep -o "[[:digit:]]\{1,\}[[:space:]]ms" $f`
x=${f##*alphabet-}
y=${x%%.*}
z=${y/\//_};
cfg_file=$z
echo $cfg_file,${runtime_ms%% ms} >> runtimes_slset_nonopt.log
done
for f in `find c/test/grammars/cfg-analyzer-benchmarks -name *_log_slset_simpl*`
do
runtime_ms=`grep -o "[[:digit:]]\{1,\}[[:space:]]ms" $f`
x=${f##*alphabet-}
y=${x%%.*}
z=${y/\//_};
cfg_file=$z
echo $cfg_file,${runtime_ms%% ms} >> runtimes_slset_simpl.log
done
for f in `find c/test/grammars/cfg-analyzer-benchmarks -name *_log_mlset_simpl*`
do
runtime_ms=`grep -o "[[:digit:]]\{1,\}[[:space:]]ms" $f`
x=${f##*alphabet-}
y=${x%%.*}
z=${y/\//_};
cfg_file=$z
echo $cfg_file,${runtime_ms%% ms} >> runtimes_mlset_simpl.log
done
for f in `find c/test/grammars/cfg-analyzer-benchmarks -name *_log_mlset_nonopt*`
do
runtime_ms=`grep -o "[[:digit:]]\{1,\}[[:space:]]ms" $f`
x=${f##*alphabet-}
y=${x%%.*}
z=${y/\//_};
cfg_file=$z
echo $cfg_file,${runtime_ms%% ms} >> runtimes_mlset_nonopt.log
done