[m-rev.] diff: make speed_summary's output nicer
Zoltan Somogyi
zs at cs.mu.OZ.AU
Fri Jan 18 17:55:23 AEDT 2002
tools/speed_summary:
Guarantee that the output covers the variants being tested in the same
order as the input.
Zoltan.
Index: speed_summary
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/speed_summary,v
retrieving revision 1.3
diff -u -b -r1.3 speed_summary
--- speed_summary 2002/01/11 05:59:30 1.3
+++ speed_summary 2002/01/15 14:01:24
@@ -25,6 +25,13 @@
NF == 8 {
variant = $1;
+
+ if (variants[variant] == "") {
+ variants[variant] = variant;
+ variant_order[cur_variant + 0] = variant;
+ cur_variant++;
+ }
+
time = substr($2, 1, length($2) - 1);
# printf "read %s %9.2f\n", variant, time;
@@ -44,7 +51,8 @@
next;
}
END {
- for (variant in times_count) {
+ for (ordinal = 0; ordinal < cur_variant; ordinal++) {
+ variant = variant_order[ordinal];
count = times_count[variant];
# perform insertion sort on times[variant "@" *]
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list