Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/benchmarks/bin/runit
ViewVC logotype

Annotation of /sml/trunk/benchmarks/bin/runit

Parent Directory Parent Directory | Revision Log Revision Log


Revision 219 - (view) (download)

1 : monnier 219 #!/bin/sh
2 :    
3 :     prgdir="programs"
4 :     loadfile="load"
5 :     benchnamefile="name"
6 :    
7 :     if [ $# -gt 0 ]; then repeat=$1; shift; fi
8 :     if [ $# -gt 0 ]; then output=$1; shift; fi
9 :    
10 :     : ${repeat:=3}
11 :     : ${output:=/dev/tty}
12 :    
13 :     loads=''
14 :     for b do loads="$loads $prgdir/$b/$loadfile"; done
15 :     : ${loads:=`echo $prgdir/*/$loadfile`}
16 :    
17 :     cat <<EOF
18 :     use "util/timeStd.sml";
19 :     val out = TextIO.openAppend("$output");
20 :     EOF
21 :    
22 :     for load in $loads; do
23 :     bdir=`dirname $load`;
24 :     file=`basename $load`;
25 :     bench=`cat $bdir/$benchnamefile 2>/dev/null`
26 :     : ${bench:=`basename $bdir`}
27 :     cat <<EOF
28 :     OS.FileSys.chDir "$bdir";
29 :     Timing.timeCompKJgraph(out, "$bench", "$file");
30 :     OS.FileSys.chDir "../..";
31 :     Timing.timeRunKJgraph(out, "$bench", $repeat, Main.doit);
32 :     EOF
33 :     done

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0