From 18073bd7a269b32ecdc8e84328f8475423487526 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Mon, 11 Jun 2012 20:43:05 -0400 Subject: [PATCH] Remove --[no]zero-bool from pt-query-digest. --- bin/pt-query-digest | 10 ++-------- lib/QueryReportFormatter.pm | 6 ++---- t/lib/QueryReportFormatter.t | 1 - 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/bin/pt-query-digest b/bin/pt-query-digest index 790cc28f..3c3e0a23 100755 --- a/bin/pt-query-digest +++ b/bin/pt-query-digest @@ -6444,7 +6444,7 @@ sub header { next unless exists $results->{globals}->{$attrib}; my $store = $results->{globals}->{$attrib}; - if ( $store->{sum} > 0 || $args{zero_bool} ) { + if ( $store->{sum} > 0 ) { push @result, sprintf $self->{bool_format}, $self->make_label($attrib), $self->bool_percents($store); @@ -6731,7 +6731,7 @@ sub event_report { my $vals = $store->{$attrib}; next unless scalar %$vals; - if ( $vals->{sum} > 0 || $args{zero_bool} ) { + if ( $vals->{sum} > 0 ) { push @result, sprintf $self->{bool_format}, $self->make_label($attrib), $self->bool_percents($vals); @@ -15520,12 +15520,6 @@ default: yes Zero out the Rows_XXX properties for administrator command events. -=item --[no]zero-bool - -default: yes - -Print 0% boolean values in report. - =back =head1 DSN OPTIONS diff --git a/lib/QueryReportFormatter.pm b/lib/QueryReportFormatter.pm index 65cbb720..a38d2c99 100644 --- a/lib/QueryReportFormatter.pm +++ b/lib/QueryReportFormatter.pm @@ -204,7 +204,6 @@ sub files { # * orderby scalar: attrib items ordered by # Optional arguments: # * select arrayref: attribs to print, mostly for testing -# * zero_bool bool: print zero bool values (0%) # Print a report about the global statistics in the EventAggregator. # Formerly called "global_report()." sub header { @@ -296,7 +295,7 @@ sub header { next unless exists $results->{globals}->{$attrib}; my $store = $results->{globals}->{$attrib}; - if ( $store->{sum} > 0 || $args{zero_bool} ) { + if ( $store->{sum} > 0 ) { push @result, sprintf $self->{bool_format}, $self->make_label($attrib), $self->bool_percents($store); @@ -485,7 +484,6 @@ sub query_report { # * select arrayref: attribs to print, mostly for testing # * reason scalar: why this item is being reported (top|outlier) # * rank scalar: item rank among the worst -# * zero_bool bool: print zero bool values (0%) # Print a report about the statistics in the EventAggregator. # Called by query_report(). sub event_report { @@ -648,7 +646,7 @@ sub event_report { my $vals = $store->{$attrib}; next unless scalar %$vals; - if ( $vals->{sum} > 0 || $args{zero_bool} ) { + if ( $vals->{sum} > 0 ) { push @result, sprintf $self->{bool_format}, $self->make_label($attrib), $self->bool_percents($vals); diff --git a/t/lib/QueryReportFormatter.t b/t/lib/QueryReportFormatter.t index 12213113..1124cab0 100644 --- a/t/lib/QueryReportFormatter.t +++ b/t/lib/QueryReportFormatter.t @@ -536,7 +536,6 @@ $result = $qrf->header( ea => $ea, # select => [ $ea->get_attributes() ], orderby => 'Query_time', - zero_bool => 0, ); ok(