mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 05:00:45 +00:00
Remove XXX hack from pqd that makes it write every thing it reads to /tmp/slow.log* files.
This commit is contained in:
@@ -13739,12 +13739,7 @@ sub main {
|
|||||||
}
|
}
|
||||||
} # sample
|
} # sample
|
||||||
|
|
||||||
# XXX
|
if ( $o->get('output') =~ /slowlog/i ) {
|
||||||
# if ( $o->get('output') =~ /slowlog/i ) {
|
|
||||||
my $utc_ts = ts(time, 1);
|
|
||||||
$utc_ts =~ s/:/_/g;
|
|
||||||
my $events_file = "/tmp/slow.log-$utc_ts";
|
|
||||||
open my $events_fh, '>', $events_file or die "Cannot open $events_file: $OS_ERROR";
|
|
||||||
my $w = new SlowLogWriter();
|
my $w = new SlowLogWriter();
|
||||||
$pipeline->add(
|
$pipeline->add(
|
||||||
name => '--output slowlog',
|
name => '--output slowlog',
|
||||||
@@ -13752,11 +13747,11 @@ open my $events_fh, '>', $events_file or die "Cannot open $events_file: $OS_ERRO
|
|||||||
my ( $args ) = @_;
|
my ( $args ) = @_;
|
||||||
my $event = $args->{event};
|
my $event = $args->{event};
|
||||||
PTDEBUG && _d('callback: --output slowlog');
|
PTDEBUG && _d('callback: --output slowlog');
|
||||||
$w->write($events_fh, $event);
|
$w->write(*STDOUT, $event);
|
||||||
return $args;
|
return $args;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
# } # print
|
} # print
|
||||||
|
|
||||||
# Finally, add aggregator obj for each groupby attrib to the callbacks.
|
# Finally, add aggregator obj for each groupby attrib to the callbacks.
|
||||||
# These aggregating objs should be the last pipeline processes.
|
# These aggregating objs should be the last pipeline processes.
|
||||||
|
Reference in New Issue
Block a user