Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-22871

wrong index while calculating 90Line

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • performance-plugin
    • None

      In the file PerformanceReport.java, where the calculation of get90Line is done, we have:
      result = allSamples.get((int) (allSamples.size() * .9)).getDuration();

      I think we should have:
      result = allSamples.get(((int) (allSamples.size() * .9)) -1).getDuration();

      Because actually we get the next value. With this way of doing it, if we want the max, multiplying by 1, we'll get an IndexOutOfBoundsException
      result = allSamples.get((int) (allSamples.size() * 1)).getDuration();

      it is like doing:
      allSamples.get(allSamples.size())

            manolo Manuel Carrasco
            pablomar pablo martinez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: