sync code with last improvements from OpenBSD
This commit is contained in:
commit
88965415ff
26235 changed files with 29195616 additions and 0 deletions
35
app/x11perf/perfratio
Normal file
35
app/x11perf/perfratio
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/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 ("%12.1f", base);
|
||||
for (i = 2; i < '$1'; i++) {
|
||||
if (base == 0)
|
||||
printf (" lots ", $i);
|
||||
else {
|
||||
rate=$i/base;
|
||||
printf (" %10.3f", rate);
|
||||
}
|
||||
}
|
||||
printf (" ");
|
||||
for (; i <= NF; i++)
|
||||
{
|
||||
printf ("%s ", $i);
|
||||
}
|
||||
printf ("\n");
|
||||
next;
|
||||
}
|
||||
{ print $0; }
|
||||
'
|
Loading…
Add table
Add a link
Reference in a new issue