mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-19 00:43:58 +00:00
Test and fix very small --chunk-time. Report immediately when a slave is stopped. Add short form -q for --quiet. Report very slow checksums once for each table. Use Cxn::name() instead of Cxn::dsn()->{n}; remove n from DSNParser; make cxn's name @@hostname by default, else stringified DSN parts.
This commit is contained in:
@@ -125,11 +125,21 @@ sub start {
|
||||
# many lines we're done processing -- a number between 0 and 800. You can also
|
||||
# optionally pass in the current time, but this is only for testing.
|
||||
sub update {
|
||||
my ( $self, $callback, $now ) = @_;
|
||||
my ( $self, $callback, %args ) = @_;
|
||||
my $jobsize = $self->{jobsize};
|
||||
$now ||= time();
|
||||
my $now ||= $args{now} || time;
|
||||
|
||||
$self->{iterations}++; # How many updates have happened;
|
||||
|
||||
# The caller may want to report something special before the actual
|
||||
# first report ($callback) if, for example, they know that the wait
|
||||
# could be long. This is called only once; subsequent reports will
|
||||
# come from $callback after 30s, or whatever the interval is.
|
||||
if ( !$self->{first_report} && $args{first_report} ) {
|
||||
$args{first_report}->();
|
||||
$self->{first_report} = 1;
|
||||
}
|
||||
|
||||
# Determine whether to just quit and return...
|
||||
if ( $self->{report} eq 'time'
|
||||
&& $self->{interval} > $now - $self->{last_reported}
|
||||
|
Reference in New Issue
Block a user