mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-21 10:17:18 +00:00
Test --run-time and --progress.
This commit is contained in:
@@ -82,6 +82,13 @@ has 'read_timeout' => (
|
||||
default => 0,
|
||||
);
|
||||
|
||||
has 'progress' => (
|
||||
is => 'ro',
|
||||
isa => 'Maybe[Object]',
|
||||
required => 0,
|
||||
default => sub { return },
|
||||
);
|
||||
|
||||
##
|
||||
# Private
|
||||
##
|
||||
@@ -197,6 +204,10 @@ sub next {
|
||||
) {
|
||||
$self->stats->{queries_read}++;
|
||||
|
||||
if ( my $pr = $self->progress ) {
|
||||
$pr->update($self->_parser_args->{tell});
|
||||
}
|
||||
|
||||
if ( ($event->{cmd} || '') ne 'Query' ) {
|
||||
PTDEBUG && _d('Skipping non-Query cmd');
|
||||
$self->stats->{not_query}++;
|
||||
|
Reference in New Issue
Block a user