Example #1
0
        public async Task Execute(double coreDeveloperThreshold, string coreDeveloperCalculationType)
        {
            using (var dbContext = new GitRepositoryDbContext(false))
            {
                _logger.LogInformation("{datetime}: extracting developer statistics for each period.", DateTime.Now);

                var reviewersPeriodsDic       = dbContext.GetPeriodReviewerCounts();
                var reviewersParticipationDic = dbContext.GetReviewersParticipationDates();
                await ExtractDevelopersInformation(reviewersPeriodsDic, reviewersParticipationDic, dbContext).ConfigureAwait(false);
                await ExctractContributionsPerPeriod(coreDeveloperThreshold, coreDeveloperCalculationType, reviewersPeriodsDic, dbContext).ConfigureAwait(false);

                await dbContext.SaveChangesAsync().ConfigureAwait(false);

                _logger.LogInformation("{datetime}: developer information has been extracted and saved.", DateTime.Now);
            }
        }