-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun_float_benchmarks.sh
More file actions
executable file
·38 lines (34 loc) · 1.04 KB
/
run_float_benchmarks.sh
File metadata and controls
executable file
·38 lines (34 loc) · 1.04 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
BENCH_PREFIX='float_'
for f in `find c/test/grammars/float-random -name ${BENCH_PREFIX}'*.cfg'`
do
for i in {1..5}
do
echo $f
echo "float:"
# outf=${f}_log_float_noscc_${i}
outf=${f}_log_float_${i}
echo $outf
# echo `timeout 5m ./c/src/newton -f $f --float -i 10 | grep "Multiplication\|Addition\|Star" | wc -l`' ms' > $outf
timeout 5m ./c/src/fpsolve -f $f --float -i 10 -s newtonNumeric > $outf
if [ $? -ne 0 ]; then
#!= 0 signals a timeout or that sth else is wrong
echo "TIMEOUT"
echo "TIMEOUT: 999111999 ms" >> ${outf}
fi
done
done
#rm runtimes_${BENCH_PREFIX}.log
for i in {1..5}
do
for f in `find c/test/grammars/float-random -name ${BENCH_PREFIX}*log_float_${i}`
do
runtime_ms=`grep -o "[[:digit:]]\{1,\}[[:space:]]ms" $f`
x=${f#*${BENCH_PREFIX}}
y=${x%%.*}
z=${y/\//_};
cfg_file=$z
echo $cfg_file,${runtime_ms%% ms} >> runtimes_${BENCH_PREFIX}_${i}.log
done
sort -g runtimes_${BENCH_PREFIX}_${i}.log > rt.tmp
mv rt.tmp runtimes_${BENCH_PREFIX}_${i}.log
done