Jenkins's time estimate for jobs looks wrong.

      On the screenshot attached, you can see that the estimate is of 3h, but just by looking at the estimate for each step of my build, I know it will be much less.

      I think the estimate is currently computed as the mean of all (successful ?) builds.

      I believe it would be better to estimate it based on the estimated time of the remaining steps.
      In the case that a build step goes faster (part of the build cached from last run), the estimate will be much more precise

          [JENKINS-67259] Jenkins time estimation

          AFAIK, the current algorithm is in Job.getEstimatedDuration(), called by Run.getEstimatedDuration(), which is not currently overridden in WorkflowRun. The Pipeline Stage View plugin does its own calculations in JavaScript.

          Kalle Niemitalo added a comment - AFAIK, the current algorithm is in Job.getEstimatedDuration() , called by Run.getEstimatedDuration() , which is not currently overridden in WorkflowRun . The Pipeline Stage View plugin does its own calculations in JavaScript.

          The Fast Track Queue Optimizer plugin can call Job.getEstimatedDuration() and use the results for deciding which job should be run first. To let that plugin benefit from more accurate estimations, you could override Job.getEstimatedDuration() in the WorkflowJob of the Pipeline: Job plugin. That might be more complex to implement than just making Pipeline Stage View sum the durations up.

          Kalle Niemitalo added a comment - The Fast Track Queue Optimizer plugin can call Job.getEstimatedDuration() and use the results for deciding which job should be run first. To let that plugin benefit from more accurate estimations, you could override Job.getEstimatedDuration() in the WorkflowJob of the Pipeline: Job plugin. That might be more complex to implement than just making Pipeline Stage View sum the durations up.

            Unassigned Unassigned
            fmichaut Francois Michaut
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: