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
/
x11perfboth,v
< prev
next >
Wrap
Text File
|
1990-01-07
|
1KB
|
66 lines
head 1.1;
access ;
symbols ;
locks ; strict;
comment @# @;
1.1
date 90.01.07.20.24.09; author joel; state Exp;
branches ;
next ;
desc
@Add ratios to an x11perfcomp outpout
@
1.1
log
@Initial revision
@
text
@#!/bin/sh
awk '
/^ 1/ && READY == 0 { printf (" 1 ");
for (i = 2; i < NF; i++)
printf (" %2d ", i);
printf (" Operation\n");
next;
}
/^---/ { printf ("--------");
for (i = 2; i <= NF; i++)
printf (" -----------------");
printf ("\n");
READY=1; next;
}
READY==1 {
base=$1;
printf ("%8.1f", base);
for (i = 2; i < '$1'; i++) {
if (base == 0)
printf (" %8.1f ", $i);
else {
rate=$i/base;
if (rate < .1)
printf (" %8.1f (%6.3f)", $i, rate);
else if (rate < 1000)
printf (" %8.1f (%6.2f)", $i, rate);
else
printf (" %8.1f (%6.0f)", $i, rate);
}
}
printf (" ");
for (; i <= NF; i++)
{
printf ("%s ", $i);
}
printf ("\n");
next;
}
{ print $0; }
'
@