mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-20 01:16:14 +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 {
|
sub filter_zeroed_rows {
|
||||||
my ($self, $new_val) = @_;
|
my ($self) = @_;
|
||||||
if ( defined($new_val) ) {
|
|
||||||
$self->{filter_zeroed_rows} = $new_val;
|
|
||||||
}
|
|
||||||
return $self->{filter_zeroed_rows};
|
return $self->{filter_zeroed_rows};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub set_filter_zeroed_rows {
|
||||||
|
my ($self, $new_val) = @_;
|
||||||
|
$self->{filter_zeroed_rows} = $new_val;
|
||||||
|
}
|
||||||
|
|
||||||
sub sample_time {
|
sub sample_time {
|
||||||
my ($self, $new_val) = @_;
|
my ($self, $new_val) = @_;
|
||||||
if (defined($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.
|
# Eeep. In OptionParser, "true" means show; in Diskstats, "true" means hide.
|
||||||
# Thus !$new_val for OptionParser
|
# Thus !$new_val for OptionParser
|
||||||
$args{options}->{OptionParser}->set('zero-rows', !$new_val);
|
$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;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -221,7 +221,7 @@ is_deeply(
|
|||||||
"...And clears the internal duplicate-checking list"
|
"...And clears the internal duplicate-checking list"
|
||||||
);
|
);
|
||||||
|
|
||||||
$obj->filter_zeroed_rows(1);
|
$obj->set_filter_zeroed_rows(1);
|
||||||
my $print_output = output(
|
my $print_output = output(
|
||||||
sub {
|
sub {
|
||||||
$obj->print_rows(
|
$obj->print_rows(
|
||||||
@@ -231,7 +231,7 @@ my $print_output = output(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
$obj->filter_zeroed_rows(0);
|
$obj->set_filter_zeroed_rows(0);
|
||||||
|
|
||||||
is(
|
is(
|
||||||
$print_output,
|
$print_output,
|
||||||
|
Reference in New Issue
Block a user