~percona-toolkit-dev/percona-toolkit/2.1

« back to all changes in this revision

Viewing changes to bin/pt-upgrade

Merge pt-upgrade-hostname-bug-980318-summary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9498
9498
   my $query_id_col = {
9499
9499
      name        => 'Query ID',
9500
9500
   };
 
9501
   my $hostno = 0;
9501
9502
   my @host_cols = map {
9502
 
      my $col = { name => $_->{name} };
 
9503
      $hostno++;
 
9504
      my $col = { name => "host$hostno" };
9503
9505
      $col;
9504
9506
   } @$hosts;
9505
9507
 
9595
9597
 
9596
9598
   my $report = new ReportFormatter();
9597
9599
   $report->set_title('Row count differences');
 
9600
   my $hostno = 0;
9598
9601
   $report->set_columns(
9599
9602
      $args{query_id_col},
9600
 
      map {
9601
 
         my $col = { name => $_->{name}, right_justify => 1  };
 
9603
      (map {
 
9604
         $hostno++;
 
9605
         my $col = { name => "host$hostno", right_justify => 1  };
9602
9606
         $col;
9603
 
      } @{$args{hosts}},
 
9607
      } @{$args{hosts}}),
9604
9608
   );
9605
9609
 
9606
9610
   my $diff_row_counts = $self->{diffs}->{row_counts};
9836
9840
   my $query_id_col = {
9837
9841
      name        => 'Query ID',
9838
9842
   };
 
9843
   my $hostno = 0;
9839
9844
   my @host_cols = map {
9840
 
      my $col = { name => $_->{name} };
 
9845
      $hostno++;
 
9846
      my $col = { name => "host$hostno" };
9841
9847
      $col;
9842
9848
   } @$hosts;
9843
9849
 
9867
9873
 
9868
9874
   my $report = new ReportFormatter();
9869
9875
   $report->set_title('Big query time differences');
 
9876
   my $hostno = 0;
9870
9877
   $report->set_columns(
9871
9878
      $args{query_id_col},
9872
 
      map {
9873
 
         my $col = { name => $_->{name}, right_justify => 1  };
 
9879
      (map {
 
9880
         $hostno++;
 
9881
         my $col = { name => "host$hostno", right_justify => 1  };
9874
9882
         $col;
9875
 
      } @{$args{hosts}},
 
9883
      } @{$args{hosts}}),
9876
9884
      { name => 'Difference', right_justify => 1 },
9877
9885
   );
9878
9886
 
9902
9910
 
9903
9911
   my $report = new ReportFormatter();
9904
9912
   $report->set_title('Significant query time differences');
 
9913
   my $hostno = 0;
9905
9914
   $report->set_columns(
9906
9915
      $args{query_id_col},
9907
 
      map {
9908
 
         my $col = { name => $_->{name}, right_justify => 1  };
 
9916
      (map {
 
9917
         $hostno++;
 
9918
         my $col = { name => "host$hostno", right_justify => 1  };
9909
9919
         $col;
9910
 
      } @{$args{hosts}},
 
9920
      } @{$args{hosts}}),
9911
9921
      { name => '%Increase',  right_justify => 1 },
9912
9922
      { name => '%Threshold', right_justify => 1 },
9913
9923
   );
10186
10196
   my $query_id_col = {
10187
10197
      name        => 'Query ID',
10188
10198
   };
 
10199
   my $hostno = 0;
10189
10200
   my @host_cols = map {
10190
 
      my $col = { name => $_->{name} };
 
10201
      $hostno++;
 
10202
      my $col = { name => "host$hostno" };
10191
10203
      $col;
10192
10204
   } @$hosts;
10193
10205
 
10230
10242
         my ($hostno, $code, $message) = @{$diff_warnings->{$item}->{$_}};
10231
10243
         $report->add_line(
10232
10244
            $get_id->($item) . '-' . $_,
10233
 
            $args{hosts}->[$hostno]->{name}, $code, $message,
 
10245
            "host" . ($hostno + 1), $code, $message,
10234
10246
         );
10235
10247
      } sort { $a <=> $b } keys %{$diff_warnings->{$item}};
10236
10248
   }
10251
10263
 
10252
10264
   my $report = new ReportFormatter(extend_right => 1);
10253
10265
   $report->set_title('Warning level differences');
 
10266
   my $hostno = 0;
10254
10267
   $report->set_columns(
10255
10268
      $args{query_id_col},
10256
10269
      { name => 'Code', right_justify => 1 },
10257
 
      map {
10258
 
         my $col = { name => $_->{name}, right_justify => 1  };
 
10270
      (map {
 
10271
         $hostno++;
 
10272
         my $col = { name => "host$hostno", right_justify => 1  };
10259
10273
         $col;
10260
 
      } @{$args{hosts}},
 
10274
      } @{$args{hosts}}),
10261
10275
      { name => 'Message' },
10262
10276
   );
10263
10277
 
10287
10301
 
10288
10302
   my $report = new ReportFormatter();
10289
10303
   $report->set_title('Warning count differences');
 
10304
   my $hostno = 0;
10290
10305
   $report->set_columns(
10291
10306
      $args{query_id_col},
10292
 
      map {
10293
 
         my $col = { name => $_->{name}, right_justify => 1  };
 
10307
      (map {
 
10308
         $hostno++;
 
10309
         my $col = { name => "host$hostno", right_justify => 1  };
10294
10310
         $col;
10295
 
      } @{$args{hosts}},
 
10311
      } @{$args{hosts}}),
10296
10312
   );
10297
10313
 
10298
10314
   my $diff_warning_counts = $self->{diffs}->{warning_counts};