home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- # $Header: mkcomp,v 1.3 87/09/17 06:08:30 kenj Exp $
- # Make tbl source for pairwise machine comparison.
- prog=$0
- if test $# -ne 2
- then
- echo "Usage: $prog machine compared-to"
- exit 1
- fi
- out=$1-$2
- for x in 1 2
- do
- init=`./mk1 $prog $1`
- test $? != 0 && echo "$init" && exit 1
- test $x = 1 && shift
- init=`echo $init | sed "s/=/$x=/g"`
- eval $init
- done
- cat >$out <<End-of-File-Grunt
- .\" \$Compile: typeset -me -t %f
- .nr tf 0
- .nr tp 10
- .nr pp 10
- .nr fp 10
- .ll 6.5i
- .sz 10
- .he 'MUSBUS'Monash UNIX Benchmarking Suite''
- .fo '$MC1 \- $MC2''\*(td'
- .(b
- .TS
- doublebox,center;
- l | c | c
- l | l | l.
- This System Relative To
- _
- Processor $MC1 $MC2
- $OPT1 $OPT2
- Memory $MEM1 $MEM2
- UNIX Version $UNIX1 $UNIX2
- Test Date $D1 $D2
- MUSBUS Version $V1 $V2
- .TE
- .)b
- End-of-File-Grunt
-
- ./mk2 $log2 \
- | sed \
- -e '/^_$/d' \
- -e '/^\.so /d' \
- -e '/^\.TE/d' \
- -e '/^\.)b/d' \
- -e 's/^\([^ ]* \)\(.*\)/\/^\1\/s\/$\/ \2\//' \
- > tmp.$$
-
- echo "Disks $DISKS1 $DISKS2" > disks
- ./mk2 $log1 \
- | sed -f tmp.$$ \
- | awk '
- BEGIN { FS=" " }
- /tbl.1/ { inv = 0 }
- /tbl.2/ { inv = 1 }
- /tbl.3/ { inv = 1 }
- /tbl.5/ { inv = 0 }
- /[0-9]\.[0-9]/ && NF==5 {
- printf $1;
- r2 = r1 = "\\*(if"
- if (!inv) {
- if ($2) r1 = $4/$2
- if ($3) r2 = $5/$3
- }
- else {
- if ($4) r1 = $2/$4
- if ($5) r2 = $3/$5
- }
- printf "\t%.2f\t%.2f\t%.2f\t%.2f\n",$2,$3,r1,r2
- next
- }
- /[0-9]\.[0-9]/ && NF==7 {
- printf $1;
- if (!inv) {
- if ($2) r1 = $5/$2
- if ($3) r2 = $6/$3
- if ($4) r3 = $7/$4
- }
- else {
- if ($5) r1 = $2/$5
- if ($6) r2 = $3/$6
- if ($7) r3 = $4/$7
- }
- printf "\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\n",$2,$3,$4,r1,r2,r3
- next;
- }
- /[0-9]\.[0-9]/ { printf "%s\t?\t?\t?\t?\n",$1; next }
- { print }' \
- | sed \
- -e 's/^\.so tbl\./.so comptbl./' \
- -e 's/^\([1-9][0-9]*\)_Users/\1/' \
- | soelim >>$out
- rm -f disks tmp.$$
-