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

Incorrect display build duration time

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Trivial
    • Resolution: Unresolved
    • Component/s: core, metrics-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.138.3
    • Similar Issues:

      Description

      I see an incorrect display of task execution time.

      For example, 

      This run spent:

      • 11 min waiting;
      • 13 min build duration;
      • 13 min total from scheduled to completion.

      In fact, the build was executed in just 2 minutes, but i see 13 minutes (waiting + exec time).

      JSON contains correct timings:

      "buildableTimeMillis":702663,"buildingDurationMillis":832158,"executingTimeMillis":129299.

       

       

        Attachments

          Activity

          Hide
          stephenfrench9 Stephen French added a comment -

          I am working on reproducing this error. 

          Can you clarify which two reports of build time disagree?

          Which display of task execution time are you speaking of? (The pipeline dashboard? For example, I browse to my Jenkins server running on an aws instance at  http://54.198.76.254:8080/ , and then click on my project, to take me to the pipeline dashboard. I named my project 'foo'. So the final address in my browser is http://54.198.76.254:8080/job/foo/. This page gives me times for all the different stages of my Jenkins pipeline)

          And the second source for build time (the JSON source), are you finding this at $BUILD_URL/api/json? For example, when I go to http://54.198.76.254:8080/job/foo/1/api/json?pretty=true I can see a "duration" entry with a value of 17994.

          Show
          stephenfrench9 Stephen French added a comment - I am working on reproducing this error.  Can you clarify which two reports of build time disagree? Which display of task execution time are you speaking of? (The pipeline dashboard? For example, I browse to my Jenkins server running on an aws instance at  http://54.198.76.254:8080/  , and then click on my project, to take me to the pipeline dashboard. I named my project 'foo'. So the final address in my browser is http://54.198.76.254:8080/job/foo/ . This page gives me times for all the different stages of my Jenkins pipeline) And the second source for build time (the JSON source), are you finding this at $BUILD_URL/api/json? For example, when I go to http://54.198.76.254:8080/job/foo/1/api/json?pretty=true I can see a "duration" entry with a value of 17994.
          Hide
          maxx_nomad Maksim Kolesnikov added a comment - - edited

          I run several builds and some of them are queued. 

          On the screen build was in the queue for 90 second. 

          The build worked about 138 seconds. But on build page I see 3 min 49 sec build duration.

          Сause it shows all time given the queue time, not the net execution time.

          Also this wrong time is shown in the build list:

           

          I think on these places we must use "executingTimeMillis" value.

          Values from JSON for my example are:

          "executingTimeMillis":138877

          "buildableTimeMillis":90665

          "buildingDurationMillis":229616

          Show
          maxx_nomad Maksim Kolesnikov added a comment - - edited I run several builds and some of them are queued.  On the screen build was in the queue for 90 second.  The build worked about 138 seconds. But on build page I see 3 min 49 sec build duration. Сause it shows all time given the queue time, not the net execution time. Also this wrong time is shown in the build list:   I think on these places we must use "executingTimeMillis" value. Values from JSON for my example are: "executingTimeMillis":138877 "buildableTimeMillis":90665 "buildingDurationMillis":229616
          Hide
          mawinter69 Markus Winter added a comment -

          Technically the duration is the time the job started until it finished. We have pipeline jobs here, they start without the need of an executor, so they usually do not spent any time in the queue. So I assume the job was waiting in between to get a free slot on an agent. So what me might need is an additional column with Execution time.

           

          Show
          mawinter69 Markus Winter added a comment - Technically the duration is the time the job started until it finished. We have pipeline jobs here, they start without the need of an executor, so they usually do not spent any time in the queue. So I assume the job was waiting in between to get a free slot on an agent. So what me might need is an additional column with Execution time.  

            People

            Assignee:
            stephenfrench9 Stephen French
            Reporter:
            maxx_nomad Maksim Kolesnikov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: