--- /dev/null
+#!/bin/sh
+#
+# e.g:
+# echo 'Ignore: bogus1 bogus2' | compare-logs - LOG.7.3 LOG.8.0 | neat
+#
+
+awk '
+BEGIN {}
+/^Ignore:/ { for (i=2; i<=NF; i++) ign[$i]=1 }
+/^Benchmark:/ { name = $2 }
+/^Time:/ { m[name] = m[name] " " $2; name = "<error>" }
+END {
+ tests = 0
+ for(i=0;i<100;i++) p[i]=1
+ for (b in m)
+ if (ign[b]!=1) {
+ tests++
+ n = split (m[b], t)
+ printf "%s",b
+ for (i=1; i<=n; i++) {
+ printf "\t%.2f",t[i]
+ s[i*10]="-"
+ for (j=1; j<i; j++) {
+ r = t[i]/(t[j]+1e-10)
+ printf "\t%.3f",r
+ s[i*10+j] += r
+ p[i*10+j] *= r
+ }
+ }
+ print ""
+ }
+ printf "~a.mean"
+ for (i = 1; i< 100; i++) {
+ if (s[i]=="-") printf"\t-"
+ else if (s[i]!="") printf"\t%.3f",s[i]/tests;
+ }
+ print ""
+ printf "~g.mean"
+ for (i = 1; i< 100; i++) {
+ if (s[i]=="-") printf"\t-"
+ else if (s[i]!="") printf"\t%.3f",p[i]^(1/tests);
+ }
+ print ""
+}
+' "$@"
\ No newline at end of file