#! /bin/sh

outfilenm=${1}.csv
i=0

echo "Wall Time,CPU %,Major Page Faults,Vol. Context Switches,Invol. Context Switches" > $outfilenm
while [ $i -lt 5 ]
do
  echo "##### Executing run $i"
  time --format "%E,%P,%F,%w,%c" --append --output $outfilenm ant $@
  i=`expr $i + 1`
done

