mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 21:19:59 +00:00
Use host instead of Host.
This commit is contained in:
@@ -3048,7 +3048,7 @@ sub _calc_metrics {
|
||||
sub metrics {
|
||||
my ( $self, %args ) = @_;
|
||||
foreach my $arg ( qw(attrib where) ) {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
die "I need a $arg argument" unless defined $args{$arg};
|
||||
}
|
||||
my $attrib = $args{attrib};
|
||||
my $where = $args{where};
|
||||
@@ -8628,13 +8628,13 @@ package UpgradeReportFormatter;
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
|
||||
use constant PTDEBUG => $ENV{PTDEBUG};
|
||||
|
||||
Transformers->import(qw(make_checksum percentage_of shorten micro_t));
|
||||
|
||||
use constant LINE_LENGTH => 74;
|
||||
use constant MAX_STRING_LENGTH => 10;
|
||||
|
||||
Transformers->import(qw(make_checksum percentage_of shorten micro_t));
|
||||
|
||||
my %formatting_function = (
|
||||
ts => sub {
|
||||
my ( $stats ) = @_;
|
||||
@@ -8671,6 +8671,12 @@ sub event_report {
|
||||
$line .= ('_' x (LINE_LENGTH - length($line)));
|
||||
push @result, $line;
|
||||
|
||||
my $hostno = 0;
|
||||
foreach my $host ( @$hosts ) {
|
||||
$hostno++;
|
||||
push @result, "# Host$hostno: " . ($host->{name} || '?')
|
||||
}
|
||||
|
||||
my $class = $meta_stats->{classes}->{$where};
|
||||
push @result,
|
||||
'# Found ' . ($class->{differences}->{sum} || 0)
|
||||
@@ -8687,9 +8693,10 @@ sub event_report {
|
||||
underline_header => 0,
|
||||
strip_whitespace => 0,
|
||||
);
|
||||
$hostno = 0;
|
||||
$report->set_columns(
|
||||
{ name => '' },
|
||||
map { { name => $_->{name}, right_justify => 1 } } @$hosts,
|
||||
map { $hostno++; { name => "host$hostno", right_justify => 1 } } @$hosts,
|
||||
);
|
||||
foreach my $thing ( qw(Errors Warnings) ) {
|
||||
my @vals = $thing;
|
||||
|
@@ -75,7 +75,7 @@ sub event_report {
|
||||
my $hostno = 0;
|
||||
foreach my $host ( @$hosts ) {
|
||||
$hostno++;
|
||||
push @result, "# Host$hostno: " . ($host->{name} || '?')
|
||||
push @result, "# host$hostno: " . ($host->{name} || '?')
|
||||
}
|
||||
|
||||
# Differences report. This relies on a sampleno attrib in each class
|
||||
|
@@ -110,8 +110,8 @@ $meta_events = [
|
||||
|
||||
$expected = <<EOF;
|
||||
# Query 1: ID 0x82860EDA9A88FCC5 at byte 0 _______________________________
|
||||
# Host1: host1.domain.com:3306
|
||||
# Host2: host2.domain.com:3307
|
||||
# host1: host1.domain.com:3306
|
||||
# host2: host2.domain.com:3307
|
||||
# Found 1 differences in 3 samples:
|
||||
# checksums 0
|
||||
# row counts 1
|
||||
|
Reference in New Issue
Block a user