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

Make currentBuild.duration more meaningful and add string equivalent

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      currentBuild.duration always returns 0, since Run.duration is 0 until the run completes. So we should switch currentBuild.duration to return System.currentTimeMillis() - currentBuild.startTimeInMillis and add currentBuild.durationString, calling Run.getDurationString().

        Attachments

          Issue Links

            Activity

            Show
            abayer Andrew Bayer added a comment - PR up at  https://github.com/jenkinsci/workflow-support-plugin/pull/33
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
            http://jenkins-ci.org/commit/workflow-job-plugin/0cfa03044c4a88c80df4ca18b322e4532f7d2b81
            Log:
            Deleting obsolete comment noticed in relation to JENKINS-42952.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java http://jenkins-ci.org/commit/workflow-job-plugin/0cfa03044c4a88c80df4ca18b322e4532f7d2b81 Log: Deleting obsolete comment noticed in relation to JENKINS-42952 .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java
            src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapperTest.java
            http://jenkins-ci.org/commit/workflow-support-plugin/fc61d8852021a4ddc471f7aa05c4e28c4f630f12
            Log:
            [FIXED JENKINS-42952] Make currentBuild.duration meaningful

            ...and add currentBuild.durationString.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java src/test/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapperTest.java http://jenkins-ci.org/commit/workflow-support-plugin/fc61d8852021a4ddc471f7aa05c4e28c4f630f12 Log: [FIXED JENKINS-42952] Make currentBuild.duration meaningful ...and add currentBuild.durationString.

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                abayer Andrew Bayer
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: