From 5c596ea613063822788878fb72e1af37d7c2f11d Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Tue, 27 Nov 2018 14:56:58 +0100 Subject: [PATCH] added script to get average runtime of release --- run-time.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 run-time.sh diff --git a/run-time.sh b/run-time.sh new file mode 100755 index 0000000..d23352c --- /dev/null +++ b/run-time.sh @@ -0,0 +1,9 @@ +#!/bin/bash +start=$(date +%s.%N) +nbloops=10 +for i in `seq 1 $nbloops`; do + ./bin/surfaces-unies -c -i ./img/asterix.ppm +done +end=$(date +%s.%N) +runtime=$(python -c "print((${end} - ${start}) / ${nbloops})") +echo "Average runtime was $runtime"