[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / misc / examples / cats / mangle_times
diff --git a/ghc/misc/examples/cats/mangle_times b/ghc/misc/examples/cats/mangle_times
new file mode 100644 (file)
index 0000000..b595a5b
--- /dev/null
@@ -0,0 +1,23 @@
+#! /usr/local/bin/perl
+
+$InputSize = 0;
+
+while (<>) {
+    chop;
+
+    if ( m,< /users/fp/partain/bib/comp.bib, ) {
+       $InputSize = 625643;
+       print "$_\n";
+    } elsif ( m,\$bghc/lib/libHS_p.a, ) {
+       $InputSize = 9352492;
+       print "$_\n";
+    } elsif ( m,\$bghca/lib/libHS_p.a, ) {
+       $InputSize = 25455204;
+       print "$_\n";
+
+    } elsif ( /^\s*(\d+\.\d+)u (\d+\.\d+)s / ) {
+       $UserSysTime = $1 + $2;
+       $BytesPerSec = $InputSize / $UserSysTime;
+       printf "%.0f\t%s\n", $BytesPerSec, $_;
+    }
+}