How to show build step's duration on a custom chart
Answered
Hello,I have a few build configuration that have multiple steps. I was wondering if there's an easy way to collect duration of each build step and disaply it as a custom chart.Thanks,
Please sign in to leave a comment.
Hi Jafar
TeamCity allows to draw custom charts for any additional data. But build step duration values are not exposed there.
The only way to gather these values for a chart is to develop a new TeamCity plugin.
Unfortunatelly we do not have examples of plugins with a similar functionality. Let me know if you are interested to develop such plugin, we'll explain which APIs should be used for this task.
Hi Michhael,
I'm interested in reporting on the duration of each build step. I believe we're spending too much time in different aspects of our build and "You can't fix what you don't measure". Right now it's far too difficult to measure duration across builds in a non-time-consuming manner.
Is there a recommended set of items in the API I should be leveraging? Also, this topic is over 3 years old--has this been added to TeamCity between here & there? I can't seem to find any search results for this topic as they all start pointing towards implementing performance tests for applications rather than reporting on TeamCity itself.
J
Jim,
The easiest way to show durations of build steps is to use patterns in custom charts. Currently it cannot be done through UI - it should be added to project xml file. Eg:
<project-extensions>
<extension id=
"customChart1"
type=
"buildtype-graphs"
>
<parameters>
<param name=
"title"
value=
"All stages"
/>
<param name=
"seriesTitle"
value=
"Stage"
/>
<param name=
"format"
value=
"duration"
/>
<param name=
"series"
><![CDATA[[
{
"type"
:
"valueTypes"
,
"pattern"
:
"buildStageDuration:*"
,
"title"
:
"Stage: {1}"
}
]]]>
</param>
</parameters>
</extension>
</project-extensions>
Perfect, thanks Andrey!