]> matita.cs.unibo.it Git - pkg-cerco/acc.git/blob - tests/benchs/meantime.sh
Package description and copyright added.
[pkg-cerco/acc.git] / tests / benchs / meantime.sh
1 #!/usr/bin/env bash
2
3 RUNS=2
4 COUNT=$RUNS
5 VAL=0.
6 while [ $COUNT -gt 0 ]; do
7   R=`/usr/bin/time -f %U $* 2>&1 | tail -n1`
8   VAL=`echo "print $VAL + $R" | bc`
9   COUNT=$(($COUNT - 1))
10 done
11 echo "print $VAL / $RUNS" | python