Teamcity Build Time Report is different to calculation

Answered

Hi,

Does anyone know how the build times in Administration > Build Times are produced by TC? I've been making a script to calculate them for custom timespans using the  <startDate> and <finishDate> attributes you can retrieve via the rest API. Comparing this over the same period as the TC Build Time Report (Previous month) gives a completely different result. The total of timedeltas from the API is only 1/3 of what the TeamCity UI Reports.

Here's the query I'm using to get the last months data:

$TEAMCITYHOST/app/rest/builds?locator=sinceDate:20201218T000000%2B0000,untilDate:20210118T000000%2B0000,count:4000000,lookupLimit:8000000&fields=build(startDate,finishDate)

I'm hoping if someone knows how TC calculates their build time report it might provide some insight into the difference.

Thanks

 

1 comment
Comment actions Permalink

There is a default filter that may be impacting your results. Try adding `defaultFilter:false` to the end of your query like this:

$TEAMCITYHOST/app/rest/builds?locator=sinceDate:20201218T000000%2B0000,untilDate:20210118T000000%2B0000,count:4000000,lookupLimit:8000000&fields=build(startDate,finishDate),defaultFilter:false

Additional information on the default filter can be found in the documentation at https://www.jetbrains.com/help/teamcity/rest-api-reference.html#Build+Locator

0

Please sign in to leave a comment.