measure.sh 696 Bytes
Newer Older
Christian Müller's avatar
Christian Müller committed
1
# /bin/bash
Christian Müller's avatar
Christian Müller committed
2
TIMEOUT=20s
3
shopt -s globstar
Christian Müller's avatar
Christian Müller committed
4

5
for FILE in results/**/*.ltl
Christian Müller's avatar
Christian Müller committed
6
do
7
	FOLDER=$(dirname ${FILE})
Christian Müller's avatar
Christian Müller committed
8
	NAME=$(basename ${FILE} .ltl)
9
	METRICS="${FOLDER}/${NAME}.metrics"
10

Christian Müller's avatar
Christian Müller committed
11
	echo "Measuring ${FILE}"
12 13 14 15 16 17 18
	echo "Metrics File: ${METRICS}"
	echo "" >> ${METRICS}
	echo "Measuring on $(date):" >> ${METRICS}

	# echo "    FOLTL length: $(wc -m < results/${NAME}.foltl)" >> ${RESULT}
	# echo "    LTL length: $(wc -m < ${FILE})" >> ${RESULT}

Christian Müller's avatar
Christian Müller committed
19
	if
20
		timeout ${TIMEOUT} time -p aalta/Aalta_v2.0/aalta < ${FILE} >> ${METRICS} 2>&1 
Christian Müller's avatar
Christian Müller committed
21 22
	then
		echo "Finished successfully"
23
		echo "Finished successfully" >> ${METRICS}
Christian Müller's avatar
Christian Müller committed
24 25
	else
		echo "Timeout after ${TIMEOUT}"
26
		echo "Timeout after ${TIMEOUT}" >> ${METRICS}
Christian Müller's avatar
Christian Müller committed
27 28
	fi
done