run-time.sh 408 Bytes
Newer Older
1
#!/bin/bash
2 3 4 5 6 7
if [ "$#" -ne 1 ]; then
	echo "Bad usage of run-time.sh"
	echo "./run-time <number of runs>"
	exit 1
fi
echo "Starting $1 runs of surfaces-unies"
8
start=$(date +%s.%N)
9
for i in `seq 1 $1`; do
10
	./bin/surfaces-unies -c -i ./img/asterix.ppm
11
	./bin/surfaces-unies -u -i output.su
12 13
done
end=$(date +%s.%N)    
14
runtime=$(python -c "print((${end} - ${start}) / ${1})")
15
echo "Average runtime was $runtime"