39d38
< # -f ignores fetch-loss statistics
49d47
< print " -f = Ignore fetch-loss stats\n";
133d130
< next if /^\*\*Ignore/; # temporary, to make totaling scripts easy for ISCA 03
143,153c140,143
< if ($in_dist =~ /^fetch_loss_counters/) {
< if (/^fetch_loss_counters_\d+\.end/) {
< # end line of distribution: clear $in_dist flag
< $in_dist = undef;
< next;
< }
< else {
< next if $opt_f;
<
< ($stat, $value) = /^(\S+)\s+(.*)/;
< }
---
> if (/(.*)\.end_dist/) {
> # end line of distribution: clear $in_dist flag
> $in_dist = undef;
> next;
155,175c145,153
< else {
< if (/(.*)\.end_dist/) {
< # end line of distribution: clear $in_dist flag
< $in_dist = undef;
< next;
< }
< if ($opt_d) {
< next; # bail out if we are ignoring dists...
< }
< elsif (/(.*)\.(min|max)_value/) {
< # treat these like normal stats
< ($stat, $value) = /^(\S+)\s+(.*)/;
< }
< else {
< # this is ugly because labels in the distribution
< # buckets don't start in column 0 and may include
< # embedded spaces
< ($stat, $value) =
< /^\s*(\S+(?:.*\S)?)\s+(\d+)\s+\d+\.\d+%/;
< $stat = $in_dist . '::' . $stat;
< }
---
> if ($opt_d) {
> next; # bail out if we are ignoring dists...
> } elsif (/(.*)\.(min|max)_value/) {
> # treat these like normal stats
> ($stat, $value) = /^(\S+)\s+(.*)/;
> } else {
> ($stat, $value) =
> /^(\S+(?:.*\S)?)\s+(\d+)\s+\d+\.\d+%/;
> $stat = $in_dist . '::' . $stat;
186,191d163
< elsif (/^(fetch_loss_counters_\d+)\.start/) {
< # treat fetch loss counters like distribution, sort of
< $in_dist = $1;
< $stat = $1;
< $value = 0;
< }
357,361c329,330
< # Report missing stats, but first filter out distribution buckets:
< # these are mostly noise
<
< @missing_stats = grep { !/::(\d+|overflows)?$/ } @missing_stats;
<
---
> # Report missing stats
> #
382,385d350
< # first filter out distribution buckets: mostly noise
<
< @added_stats = grep { !/::(\d+|overflows)?$/ } @added_stats;
<
401,402c366,367
< # Exit code is 0 if some stats found & no stats error, 1 otherwise
< $status = ($#key_stats >= 0 && $max_err_mag == 0.0) ? 0 : 1;
---
> # Exit code is 0 if all stats are found (with no extras) & no stats error, 1 otherwise
> $status = ($missing_stats == 0 && $added_stats == 0 && $max_err_mag == 0.0) ? 0 : 1;