Show duration of complete build chain
Maybe I'm blind, but I can not figure out how to see the duration of a complete build chain.
We have a build chain with a trigger job at the root of the dependency tree, that listens to git . The dependent build configurations compile, pack, test, analyse and at last release the product artifacts. TC displays the build chain and all the dependencies lovely. But the most interesting value for me would be the time between /checking there is a new commit in the git repository/ to /releasing the artifacts/. Where could I see this? The build duration of the trigger configuration build is only 2s, the time spent in queue is the most helpful value I found, but depends on too much other stuff, e.g. concurrently running builds on other branches.
Please sign in to leave a comment.
Hi Martin,
It would be slightly ambiguous to get duration of the build, as it could be either start-of-first to end-of-last, as you are interested in, but there could also be the possibility of aggregate time for all builds (which could also be interesting in some circumstances, such as cloud agents).
There are several possibilities:
-You can add it to the UI via a plugin: https://confluence.jetbrains.com/display/TCD10/Web+UI+Extensions
-You could encapsulate the build with some command line runners at start and end that create a parameter with the timestamp, then use those to calculate the duration
-You can use the REST API, retrieve the full build chain (https://confluence.jetbrains.com/display/TCD10/REST+API#RESTAPI-Snapshotdependencies), then use the startDate, endDate properties of the builds to calculate it yourself.
Thanks Denis, for your answer.
I understand the problem of defining "duration of the build". All your suggestions are viable to my problem. It seems to me, option 2 is the least expensive one, but I think it's not possible to display the calculated parameter in the recent builds list.
While playing around again with the statistics panel I found the "Time Spent In Queue" value. I will temporarily use this for my trigger configuration, which is sometimes an even better information.
Another option would be to see the duration of every build in the build chain view. But it's not possible to make this happen, correct?