pqd: Remove --statistics, --pipeline-profile & --fingerprints, make them part of PTDEBUG

This commit is contained in:
Brian Fraser
2013-01-11 14:52:42 -03:00
parent 4fc66a08d3
commit d0d8c59042
4 changed files with 57 additions and 145 deletions

View File

@@ -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

View File

@@ -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;