[m-rev.] diff: speed_summary
Zoltan Somogyi
zs at cs.mu.OZ.AU
Thu May 17 17:03:23 AEST 2001
tools/speed_summary:
For each test program, compute not only the average of all the times,
but also an average computed from the times left after discarding the
lowest and the highest times. This can be useful to avoid giving
unnecessary weight e.g. to the time required to swap in the program.
Zoltan.
Index: speed_summary
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/speed_summary,v
retrieving revision 1.1
diff -u -b -r1.1 speed_summary
--- speed_summary 2000/08/09 04:22:48 1.1
+++ speed_summary 2001/05/15 16:08:06
@@ -2,9 +2,14 @@
/^mercury_compile/ {
if ($1 != cur_version && cur_version != "")
{
- printf "%s %9.2f\n",
- cur_version,
- cur_total / cur_counter;
+ raw = cur_total / cur_counter;
+ if (cur_counter > 2)
+ refined = (cur_total - cur_min - cur_max) / (cur_counter - 2);
+ else
+ refined = raw;
+
+ printf "%s %9.2f %9.2f\n\n",
+ cur_version, raw, refined;
cur_version = "";
cur_counter = 0.0;
cur_total = 0.0;
@@ -13,6 +18,19 @@
time = substr($2, 1, length($2) - 1);
# printf "%9.2f\n", time;
+ if (cur_counter == 0)
+ {
+ cur_min = time;
+ cur_max = time;
+ }
+ else
+ {
+ if (time < cur_min)
+ cur_min = time;
+ if (time > cur_max)
+ cur_max = time;
+ }
+
cur_version = $1;
cur_counter++;
cur_total += time;
@@ -22,9 +40,14 @@
{
if ($1 != cur_version && cur_version != "")
{
- printf "%s %9.2f\n",
- cur_version,
- cur_total / cur_counter;
+ raw = cur_total / cur_counter;
+ if (cur_counter > 2)
+ refined = (cur_total - cur_min - cur_max) / (cur_counter - 2);
+ else
+ refined = raw;
+
+ printf "%s %9.2f %9.2f\n\n",
+ cur_version, raw, refined;
cur_version = "";
cur_counter = 0.0;
cur_total = 0.0;
@@ -35,8 +58,14 @@
END {
if (cur_version != "")
{
- printf "%s %9.2f\n",
- cur_version,
- cur_total / cur_counter;
+ raw = cur_total / cur_counter;
+ if (cur_counter > 2)
+ refined = (cur_total - cur_min - cur_max) / (cur_counter - 2);
+ else
+ refined = raw;
+
+ printf "%s %9.2f %9.2f\n\n",
+ cur_version, raw, refined;
}
+
}
--------------------------------------------------------------------------
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