The BuildStepDuration activity enables build managers to view the breakdown of build steps in the build summary screen of a completed build. By default, the activity lists only the ten slowest running build steps but user ahs the option to view either the
ten quickest or all the build steps. This information is really useful in cases where the build manager is looking to optimise build times and want to determine how long each part of build is taking. The following screenshot illustrates how the output from
this activity looks like.
Using this activity is very simple. Just drag and drop the activity right before the end of your build process. The default view is to show the ten slowest build steps. The following screenshot illustrates using this activity in a build using TFS 2012’s
default build template.
The BuildStepDuration activity contains the following properties
||Takes an object of type IBuildDetail. The activity extracts information to this object to fetch each build steps and to calculate the time it took to run that build step. It is mandatory to set this property.
||The text shown in the heading of summary section of the completed build. The default is “Build Step Duration”.
||Whether or not to display the build duration information in the summary section of the build. The default value is True.
||Specifies which build steps to display in the summary section. It is an enumeration with the following options
All – Display all the build steps
SlowestTenSteps – Displays ten steps that took the longest time to complete.
FastestTestSteps – Display ten steps that took the shortest time to complete.
The default value is SlowestTestSteps
The following screenshot illustrates an example of how these properties are set for one of my build.