Handle undef values in reports, and eval all reports.

This commit is contained in:
Daniel Nichter
2012-08-21 09:24:19 -06:00
parent ca9bee7ae5
commit 6397b3d897
3 changed files with 57 additions and 42 deletions

View File

@@ -64,7 +64,7 @@ sub event_report {
my $line = sprintf(
'# Query %d: ID 0x%s at byte %d ',
$rank || 0,
make_checksum($where),
make_checksum($where) || '0x0',
0, # $sample->{pos_in_log} || 0
);
$line .= ('_' x (LINE_LENGTH - length($line)));
@@ -89,7 +89,7 @@ sub event_report {
my @diffs = grep { $_ =~ m/^different_/ } keys %$class;
foreach my $diff ( sort @diffs ) {
push @result,
sprintf $fmt, ' ' . make_label($diff), $class->{$diff}->{sum};
sprintf $fmt, ' ' . (make_label($diff) || ''), ($class->{$diff}->{sum} || 0);
}
# Side-by-side hosts report.