mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-28 08:51:44 +00:00
Merge Brian's change in r539.
This commit is contained in:
@@ -7541,8 +7541,8 @@ use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
my $have_json = eval { require JSON };
|
||||
|
||||
our $pretty_json = undef;
|
||||
our $sorted_json = undef;
|
||||
our $pretty_json = 0;
|
||||
our $sorted_json = 0;
|
||||
|
||||
extends qw(QueryReportFormatter);
|
||||
|
||||
@@ -7588,6 +7588,8 @@ override query_report => sub {
|
||||
my $worst = $args{worst};
|
||||
|
||||
my @attribs = @{$ea->get_attributes()};
|
||||
|
||||
my %string_args = map { $_ => 1 } qw( db host arg user bytes pos_in_log );
|
||||
|
||||
my @queries;
|
||||
foreach my $worst_info ( @$worst ) {
|
||||
@@ -7628,6 +7630,9 @@ override query_report => sub {
|
||||
$class{ts_min} = $ts->{min};
|
||||
$class{ts_max} = $ts->{max};
|
||||
}
|
||||
elsif ( $string_args{$attrib} ) {
|
||||
$metrics{$attrib} = { value => $metrics{$attrib}{max} };
|
||||
}
|
||||
elsif ( ($ea->{type_for}->{$attrib} || '') eq 'num' ) {
|
||||
for my $value ( values %{$metrics{$attrib}} ) {
|
||||
next unless $value;
|
||||
|
Reference in New Issue
Block a user