summaryrefslogtreecommitdiff
path: root/perfboth
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-03-05 19:11:25 -0800
committerKeith Packard <keithp@keithp.com>2014-03-05 19:18:44 -0800
commitf640487e27a3904831ff85033a2869e981e9d942 (patch)
tree48a3235a42e957f8062f23925e719b70b94a6b12 /perfboth
parent9ba0ce7d849bbd94644664b60b50bd1e2d5813b7 (diff)
Switch to 64-bit ints
Diffstat (limited to 'perfboth')
-rw-r--r--perfboth21
1 files changed, 8 insertions, 13 deletions
diff --git a/perfboth b/perfboth
index f529841..aa4769a 100644
--- a/perfboth
+++ b/perfboth
@@ -1,31 +1,26 @@
#!/bin/sh
awk '
-/^ 1/ && READY == 0 { printf (" 1 ");
+/^ 1/ && READY == 0 { printf (" 1 ");
for (i = 2; i < NF; i++)
- printf (" %2d ", i);
- printf (" Operation\n");
+ printf (" %2d ", i);
+ printf (" Operation\n");
next;
}
-/^---/ { printf ("--------");
+/^---/ { printf ("------------");
for (i = 2; i <= NF; i++)
- printf (" -----------------");
+ printf (" -------------------------");
printf ("\n");
READY=1; next;
}
READY==1 {
base=$1;
- printf ("%8.1f", base);
+ printf ("%12.1f", base);
for (i = 2; i < '$1'; i++) {
if (base == 0)
- printf (" %8.1f ", $i);
+ printf (" %12.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 (" %12.1f (%10.3f)", $i, rate);
}
}
printf (" ");