Pipeline job - how can I get the duration of stage?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Pipeline job - how can I get the duration of stage?


In my plugin , I try to get the data of pipeline job and its stages.
I need to know the duration of the stage in specific run, so I implemented this class:


But I can't get the stage's duration from the FlowNode.
When I call to getDuration - I get a strange results, sometimes it is not the same as in the UI (stage view).

My code:
StageNodeExt stageNode = StageNodeExt.create(flowNode);
stageNode getDurationMillis();

any idea?


You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/39482915-8087-43aa-9454-4091c734c9d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.