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

API to return execution time per stage (when running, or completed, NOT ETA or averages)

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • blueocean-plugin
    • None
    • tethys

      We need to be able to show per stage (or parallel branch) duration for then a pipeline is running, or has completed.

          [JENKINS-40928] API to return execution time per stage (when running, or completed, NOT ETA or averages)

          Vivek Pandey added a comment -

          Support for duration and startTime in node and step API is already there.

          For nodes, see docs: https://github.com/jenkinsci/blueocean-plugin/tree/master/blueocean-rest#get-pipeline-run-nodes

          [ {
            "displayName" : "build",
            "durationInMillis" : 219,
            "edges" : [ {
              "id" : "9"
            } ],
            "id" : "3",
            "result" : "SUCCESS",
            "startTime" : "2016-05-06T15:15:08.719-0700",
            "state" : "FINISHED"
          }]
          

          For steps, see docs at: https://github.com/jenkinsci/blueocean-plugin/tree/master/blueocean-rest#get-pipeline-steps

          [ {
            "_class" : "io.jenkins.blueocean.rest.model.GenericResource",
            "displayName" : "Shell Script",
            "durationInMillis" : 70,
            "id" : "5",
            "result" : "SUCCESS",
            "startTime" : "2016-06-18T13:28:29.443+0900"
          }]
          

          Vivek Pandey added a comment - Support for duration and startTime in node and step API is already there. For nodes, see docs: https://github.com/jenkinsci/blueocean-plugin/tree/master/blueocean-rest#get-pipeline-run-nodes [ { "displayName" : "build" , "durationInMillis" : 219, "edges" : [ { "id" : "9" } ], "id" : "3" , "result" : "SUCCESS" , "startTime" : "2016-05-06T15:15:08.719-0700" , "state" : "FINISHED" }] For steps, see docs at: https://github.com/jenkinsci/blueocean-plugin/tree/master/blueocean-rest#get-pipeline-steps [ { "_class" : "io.jenkins.blueocean. rest .model.GenericResource" , "displayName" : "Shell Script" , "durationInMillis" : 70, "id" : "5" , "result" : "SUCCESS" , "startTime" : "2016-06-18T13:28:29.443+0900" }]

            vivek Vivek Pandey
            michaelneale Michael Neale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: