示例#1
0
        public List <BuildThroughputMetric> CalculateBuildThroughputByWeekFor(BuildFilter buildFilter)
        {
            if (IsClearCache(buildFilter.NumberOfWeeks))
            {
                CacheHelper.ClearObjectFromCache(Build.CacheKey);
            }

            return(new BuildMetricCalculator(_tellTheTime, _build)
                   .CalculateBuildThroughput(
                       buildFilter,
                       new BuildThroughputMetric()));
        }
        public List <BuildStabilityMetric> CalculateBuildFailingRateByWeek(BuildFilter buildFilter)
        {
            if (IsClearCache(buildFilter.NumberOfWeeks))
            {
                CacheHelper.ClearObjectFromCache(Build.CacheKey);
            }

            return(new BuildMetricCalculator(_tellTheTime, _build)
                   .CalculateBuildStability(
                       buildFilter,
                       new BuildStabilityMetric()));
        }
        public List <Build> Filter(BuildFilter buildFilter)
        {
            var temp = _builds.Where(b =>
                                     b.AgentName.Equals(buildFilter.BuildAgent, StringComparison.InvariantCultureIgnoreCase) ||
                                     buildFilter.BuildAgent.Equals("All", StringComparison.InvariantCultureIgnoreCase))
                       .ToList();

            temp = temp.Where(b =>
                              b.BuildTypeId.StartsWith(buildFilter.BuildTypeId, StringComparison.InvariantCultureIgnoreCase) ||
                              buildFilter.BuildTypeId.Equals("All", StringComparison.InvariantCultureIgnoreCase))
                   .ToList();

            return(temp);
        }