#!/bin/sh

time -o $1.tmp -f "%U" ./runtests > /dev/null
time -a -o $1.tmp -f "%U" ./runtests > /dev/null
time -a -o $1.tmp -f "%U" ./runtests > /dev/null

echo "timed runtests user time (stresses regcomp)" > $1
cat $1.tmp >> $1
echo "2 k + + 3 / p" >> $1.tmp
echo -n "average: " >> $1
dc < $1.tmp >> $1
rm -f $1.tmp
