Quantcast
Channel: Team Foundation Server - General forum
Viewing all articles
Browse latest Browse all 6687

Filter number of errors in build server query prior to the query

$
0
0

I am using TFS API to query a rather large build server to obtain builds that match the provided IBuildDetailSpec and am encountering a problem when pulling the list of errors. If I query for a build that has a lot of errors (10k+), the execution time of the query slows down dramatically. Is there a way to obtain the number of errors prior to the build server query so that these builds can be filtered out?

My code:

var buildDetailSpec = buildOptions.buildServer.CreateBuildDetailSpec(teamProject.Text, buildDefinition.Text);
//Narrow down search results in order to increase query performance
buildDetailSpec.InformationTypes = new[] {"BuildError"};
buildDetailSpec.MinFinishTime = DateTime.Now - new TimeSpan(2, 0, 0, 0);
buildDetailSpec.MaxBuildsPerDefinition = 50;
buildDetailSpec.QueryOrder = BuildQueryOrder.StartTimeDescending;
var builds = buildOptions.buildServer.QueryBuilds(buildDetailSpec).Builds;

Viewing all articles
Browse latest Browse all 6687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>