[m-dev.] trivial diff: speedtest -d -s
Zoltan Somogyi
zs at cs.mu.OZ.AU
Tue Sep 21 14:33:17 AEST 1999
Estimated hours taken: 1
tools/speedtest:
Add two new options, one which tests speed when the program is run
under the debugger, and one which records the size of the executable.
Also fix an old bug: there is no option -N.
Zoltan.
cvs diff: Diffing .
Index: speedtest
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/speedtest,v
retrieving revision 1.5
diff -u -b -r1.5 speedtest
--- speedtest 1997/12/23 09:58:42 1.5
+++ speedtest 1999/09/01 10:42:23
@@ -2,9 +2,11 @@
#
# A program to test different versions of the compiler.
-usage="Usage: speedtest [-c cmd] [-nN] batchname"
+usage="Usage: speedtest [-c cmd] [-dns] batchname"
limit=4
cmd="mmc -C -O2 -I../compiler make_hlds.m"
+debug=false
+size=false
while test $# -gt 0
do
@@ -15,11 +17,17 @@
-c*)
cmd="` expr $1 : '-c\(.*\)' `" ;;
+ -d)
+ debug=true ;;
+
-n)
limit="$2" ; shift ;;
-n*)
limit="` expr $1 : '-n\(.*\)' `" ;;
+ -s)
+ size=true ;;
+
-*) echo "$0: unknown option \`$1'" 2>&1
echo $usage
exit 1 ;;
@@ -65,6 +73,11 @@
cat $paramfile
fi
+ if $size
+ then
+ size $file
+ fi
+
MERCURY_COMPILER=$root/$file
export MERCURY_COMPILER
cd trial
@@ -72,7 +85,12 @@
while test $count -le $limit
do
$ECHO -n "$file "
+ if $debug
+ then
+ echo "c" | $root/tools/dotime mdb $cmd
+ else
$root/tools/dotime $cmd
+ fi
count=`expr $count + 1`
done
cd $root
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list