echo
echo STRESS-HIGHALLOC
gendirlist stress-highalloc
printheader

for DIR in $DIRLIST; do
        INPUTS="$INPUTS `pwd`/$DIR/$TOPLEVEL/log.txt"
        TITLES="$TITLES `echo $DIR | sed -e 's/stress-highalloc-//'`"
	extract-mmtests.pl -b stress-highalloc -d $DIR --print-summary > $TMPDIR/stress-highalloc-$$-$DIR
	extract-mmtests.pl -b stress-highalloc -d $DIR --print-extra > $TMPDIR/stress-highalloc-$$-extra-$DIR
done

ROW=1
for HEADER in "Pass 1" "Pass 2" "while Rested"; do
	printf "%-12s" "$HEADER"
	VANILLA=`head -$ROW $TMPDIR/stress-highalloc-$$-stress-highalloc-$KERNEL_BASE | tail -1 | awk '{print $2}'`
	for DIR in $DIRLIST; do
		RESULT=`head -$ROW $TMPDIR/stress-highalloc-$$-$DIR | tail -1 | awk '{print $2}'`
		printf " %8.2f (%5.2f%%)" $RESULT $(($RESULT-$VANILLA))

		# Extract latencies for later
		grep ^$ROW $TMPDIR/stress-highalloc-$$-extra-$DIR | awk '{print $2" "$4}' | sort -n > $DIR/$TOPLEVEL/latencies-$ROW.txt
	done
	echo
	ROW=$(($ROW+1))
done
echo

rm $TMPDIR/stress-highalloc-$$-*
