home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
x
/
x11p-13.zip
/
RCS
/
x11perfcomp.sh
< prev
next >
Wrap
Text File
|
1989-12-27
|
3KB
|
132 lines
head 1.2;
access ;
symbols ;
locks ; strict;
comment @# @;
1.2
date 89.12.27.19.13.11; author joel; state Exp;
branches ;
next 1.1;
1.1
date 89.10.23.18.52.03; author joel; state Exp;
branches ;
next ;
desc
@Shells for comparing x11perf outputs
@
1.2
log
@Removed all references to other scripts except fillblanks.sh
@
text
@#! /bin/sh
# Collects multiple outputs of x11perf. Just feed it a list of files, each
# containing the output from an x11perf run, and this shell will extract the
# object/second information and show it in tabular form. An 80-column line is
# big enough to compare 4 different servers.
#
# This script normally uses the results from $1 to extract the test label
# descriptions, so you can run x11perf on a subset of the test and then compare
# the results. But note that fillblanks.sh requires the labels file to be a
# superset of the x11perf results file. If you run into an ugly situation in
# which none of the servers completes the desired tests (possible on non-DEC
# servers :), you can use -l <filename> as $1 and $2 to force x11perfcomp to
# use the labels stored in file $2. (You can run x11perf with the -labels
# option to generate such a file.)
#
# Mark Moraes, University of Toronto
# Joel McCormack, DEC Western Research Lab
set -e
tmp=/tmp/rates.$$
mkdir $tmp $tmp/rates
# Get either the provided label file, or construct one from the first x11perf
# output file given.
case $1 in
-l) cp $2 $tmp/labels
shift; shift
;;
*) awk '$2 == "reps" || $2 == "trep" { \
print $0; \
next; \
} \
' $1 | sed 's/^.*: //' | uniq > $tmp/labels
;;
esac
# Go through all files, and create a corresponding rate file for each
n=1
for i
do
# Get lines with average numbers, fill in any tests that may be missing
# then extract the rate field
(echo " $n "; \
echo '--------'; \
awk '$2 == "reps" || $2 == "trep" {
line = $0;
next;
}
NF == 0 && line != "" {
print line;
line="";
next;
}
' $i > $tmp/$i.avg; \
fillblanks.sh $tmp/$i.avg $tmp/labels |
sed 's/( *\([0-9]*\)/(\1/' |
awk '$2 == "reps" || $2 == "trep" {
n = substr($6,2,length($6)-7);
printf "%8s\n", n;
}
') > $tmp/rates/$i
echo "$n: $i"
n=`expr $n + 1`
done
echo ''
(echo Operation; echo '---------'; cat $tmp/labels) | \
(cd $tmp/rates; paste $* -) | \
sed 's/ / /g'
rm -rf $tmp
@
1.1
log
@Initial revision
@
text
@d2 4
a5 2
# Collects multiple outputs of x11perf. Runs getavg, fillblanks, getrate, on
# each file, and collects the output neatly.
d7 8
a14 3
# Normally uses the results from $1 to extract the test labels, which allows
# comparisons of a subset of x11perf tests. Using -l <filename> as $1 and $2
# forces x11perfcomp to use the labels stored in $2.
d22 2
d28 5
a32 1
*) getlabel.sh $1 > $tmp/labels
d35 1
d39 2
d43 17
a59 4
getavg.sh $i > $tmp/$i.avg; \
fillblanks.sh $tmp/$i.avg $tmp/labels > $tmp/$i.favg; \
getrate.sh $tmp/$i.favg) \
> $tmp/rates/$i
d64 1
a64 1
(echo Operation; echo '---------'; getlabel.sh $1) | \
d66 1
a66 1
sed 's/ / /g'
@