dComArk15/Aflevering5-x86-64/bin/timetest.sh

22 lines
811 B
Bash
Raw Normal View History

2016-01-03 12:29:05 +00:00
#!/bin/bash
echo " N: ${1}"
echo "---------"
/usr/bin/time --output=fib.log -f %e ./fib $1 &> /dev/null;
echo "fib : `cat fib.log`"
rm fib.log
/usr/bin/time --output=fib-as.log -f %e ./fib-as $1 &> /dev/null;
echo "fib-as : `cat fib-as.log`"
rm fib-as.log
/usr/bin/time --output=fib_iter.log -f %e ./fib_iter $1 &> /dev/null;
echo "fib_iter : `cat fib_iter.log`"
rm fib_iter.log
/usr/bin/time --output=fib_iter-as.log -f %e ./fib_iter-as $1 &> /dev/null;
echo "fib_iter-as : `cat fib_iter-as.log`"
rm fib_iter-as.log
/usr/bin/time --output=fib_iter-java.log -f %e ./fib_iter-java $1 &> /dev/null;
echo "fib_iter-java : `cat fib_iter-java.log`"
rm fib_iter-java.log
/usr/bin/time --output=fib-java.log -f %e ./fib-java $1 &> /dev/null;
echo "fib-java : `cat fib-java.log`"
rm fib-java.log