mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-07 21:09:14 +00:00
Fix scrolling header for --group-by=all.
This commit is contained in:
@@ -2390,9 +2390,7 @@ sub print_deltas {
|
||||
$Diskstats::printed_lines--;
|
||||
}
|
||||
|
||||
if ( $self->automatic_headers()
|
||||
&& $Diskstats::printed_lines <= @stats
|
||||
&& !$self->isa("DiskstatsGroupByAll") ) {
|
||||
if ( $self->automatic_headers() && $Diskstats::printed_lines <= @stats ) {
|
||||
$self->force_print_header( $header, "#ts", "device" );
|
||||
}
|
||||
else {
|
||||
@@ -2491,19 +2489,17 @@ sub group_by {
|
||||
|
||||
$self->clear_state() unless $self->interactive();
|
||||
|
||||
my $header_callback = $args{header_callback}
|
||||
|| sub {
|
||||
my ($self, @args) = @_;
|
||||
$self->print_header(@args);
|
||||
$self->{_print_header} = 0;
|
||||
};
|
||||
$self->parse_from(
|
||||
filehandle => $args{filehandle},
|
||||
filename => $args{filename},
|
||||
data => $args{data},
|
||||
sample_callback => sub {
|
||||
$self->print_deltas(
|
||||
header_callback => $header_callback,
|
||||
header_callback => $args{header_callback} || sub {
|
||||
my ($self, @args) = @_;
|
||||
$self->print_header(@args);
|
||||
$self->set_force_header(undef);
|
||||
},
|
||||
rows_callback => $args{rows_callback},
|
||||
);
|
||||
},
|
||||
|
Reference in New Issue
Block a user