Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-243

Have pt-query-digest option for choosing maximum hostname length.

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.9
    • Component/s: None
    • Labels:

      Description

      Currently, pt-query-digest trims hostnames to 10 charachters:

      my $print_str;
      if ( $str =~ m/(?:\d+\.){3}\d+/ ) {
      $print_str = $str; # Do not shorten IP addresses.
      }
      elsif ( length $str > MAX_STRING_LENGTH ) {
      $print_str = substr($str, 0, MAX_STRING_LENGTH) . '...';
      }
      else {
      $print_str = $str;
      }
      

       

      It would be nice to have an argument added for this, so that the user can choose maximum length to be used, without having to manually tweaking the code (the MAX_STRING_LENGTH constant).

       

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  carlos.salguero Carlos Salguero
                  Reporter:
                  agustin.gallego Agustín Gallego
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 5 hours
                    5h