mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-28 08:51:44 +00:00
pqd: Remove --statistics, --pipeline-profile & --fingerprints, make them part of PTDEBUG
This commit is contained in:
@@ -58,6 +58,24 @@ like $output,
|
||||
qr/\Q--embedded-attributes POSIX syntax [: :] belongs inside character/,
|
||||
"Bug 885382: --embedded-attributes rejects warning patterns early";;
|
||||
|
||||
|
||||
# We removed --statistics, but they should still print out if we use PTDEBUG.
|
||||
|
||||
$output = qx{PTDEBUG=1 $trunk/bin/pt-query-digest --no-report ${sample}slow002.txt 2>&1};
|
||||
my $stats = slurp_file("t/pt-query-digest/samples/stats-slow002.txt");
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/\Q$stats\E/m,
|
||||
'PTDEBUG shows --statistics for slow002.txt',
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/Pipeline profile/m,
|
||||
'PTDEBUG shows --pipeline-profile'
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# pt-query-digest help output mangled
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/831525
|
||||
|
@@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
BEGIN {
|
||||
die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n"
|
||||
unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH};
|
||||
unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib";
|
||||
};
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use Test::More tests => 1;
|
||||
|
||||
use PerconaTest;
|
||||
|
||||
require "$trunk/bin/pt-query-digest";
|
||||
|
||||
my @args = qw(--no-report --statistics);
|
||||
my $sample = "$trunk/t/lib/samples/slowlogs/";
|
||||
|
||||
ok(
|
||||
no_diff(
|
||||
sub { pt_query_digest::main(@args, $sample.'slow002.txt') },
|
||||
"t/pt-query-digest/samples/stats-slow002.txt"
|
||||
),
|
||||
'--statistics for slow002.txt',
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
exit;
|
Reference in New Issue
Block a user