mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-19 08:56:34 +00:00
Explicit setter for filter_zeroed_rows
This commit is contained in:
@@ -123,13 +123,15 @@ sub set_first_ts {
|
||||
}
|
||||
|
||||
sub filter_zeroed_rows {
|
||||
my ($self, $new_val) = @_;
|
||||
if ( defined($new_val) ) {
|
||||
$self->{filter_zeroed_rows} = $new_val;
|
||||
}
|
||||
my ($self) = @_;
|
||||
return $self->{filter_zeroed_rows};
|
||||
}
|
||||
|
||||
sub set_filter_zeroed_rows {
|
||||
my ($self, $new_val) = @_;
|
||||
$self->{filter_zeroed_rows} = $new_val;
|
||||
}
|
||||
|
||||
sub sample_time {
|
||||
my ($self, $new_val) = @_;
|
||||
if (defined($new_val)) {
|
||||
|
@@ -371,7 +371,7 @@ sub hide_inactive_disks {
|
||||
# Eeep. In OptionParser, "true" means show; in Diskstats, "true" means hide.
|
||||
# Thus !$new_val for OptionParser
|
||||
$args{options}->{OptionParser}->set('zero-rows', !$new_val);
|
||||
$args{options}->{current_group_by_obj}->filter_zeroed_rows($new_val);
|
||||
$args{options}->{current_group_by_obj}->set_filter_zeroed_rows($new_val);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -221,7 +221,7 @@ is_deeply(
|
||||
"...And clears the internal duplicate-checking list"
|
||||
);
|
||||
|
||||
$obj->filter_zeroed_rows(1);
|
||||
$obj->set_filter_zeroed_rows(1);
|
||||
my $print_output = output(
|
||||
sub {
|
||||
$obj->print_rows(
|
||||
@@ -231,7 +231,7 @@ my $print_output = output(
|
||||
);
|
||||
}
|
||||
);
|
||||
$obj->filter_zeroed_rows(0);
|
||||
$obj->set_filter_zeroed_rows(0);
|
||||
|
||||
is(
|
||||
$print_output,
|
||||
|
Reference in New Issue
Block a user