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

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

Details

    • New Feature
    • Status: Done
    • Medium
    • Resolution: Fixed
    • None
    • 3.0.9
    • None

    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).

       

      Attachments

        Issue Links

          Activity

            People

              carlos.salguero Carlos Salguero (Inactive)
              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

                  Smart Checklist