public UpdateStatsAction(ErrorStatsHelper statsHelper, OrganizationRepository organizationRepository, ProjectRepository projectRepository, ErrorStackRepository errorStackRepository) { _organizationRepository = organizationRepository; _projectRepository = projectRepository; _errorStackRepository = errorStackRepository; _statsHelper = statsHelper; }
public StatsController(ErrorStatsHelper statsHelper, IOrganizationRepository organizationRepository, IErrorStackRepository errorStackRepository, IProjectRepository projectRepository, ICacheClient cacheClient) { _cacheClient = cacheClient; _statsHelper = statsHelper; _organizationRepository = organizationRepository; _errorStackRepository = errorStackRepository; _projectRepository = projectRepository; }
public ErrorRepository(MongoDatabase database, ErrorStackRepository errorStackRepository, ProjectRepository projectRepository, OrganizationRepository organizationRepository, ICacheClient cacheClient = null, ErrorStatsHelper statsHelper = null) : base(database, cacheClient) { _errorStackRepository = errorStackRepository; _projectRepository = projectRepository; _organizationRepository = organizationRepository; _statsHelper = statsHelper; }
protected override void ConfigureClassMap(BsonClassMap <MonthProjectStats> cm) { base.ConfigureClassMap(cm); cm.SetIdMember(cm.GetMemberMap(c => c.Id)); cm.GetMemberMap(c => c.ProjectId).SetElementName(FieldNames.ProjectId).SetRepresentation(BsonType.ObjectId); cm.GetMemberMap(c => c.DayStats).SetElementName(FieldNames.DayStats).SetSerializationOptions(DictionarySerializationOptions.Document); ErrorStatsHelper.MapStatsClasses(); }
public ExceptionlessMqServer(IRedisClientsManager clientsManager, IProjectRepository projectRepository, IUserRepository userRepository, IErrorStackRepository stackRepository, IOrganizationRepository organizationRepository, ErrorPipeline errorPipeline, ErrorStatsHelper errorStatsHelper, IProjectHookRepository projectHookRepository, ICacheClient cacheClient, IMailer mailer, IAppStatsClient stats) : base(clientsManager) { _projectRepository = projectRepository; _projectHookRepository = projectHookRepository; _userRepository = userRepository; _stackRepository = stackRepository; _organizationRepository = organizationRepository; _errorPipeline = errorPipeline; _errorStatsHelper = errorStatsHelper; _cacheClient = cacheClient; _mailer = mailer; _stats = stats; RegisterHandler <SummaryNotification>(ProcessSummaryNotification, ProcessSummaryNotificationException); RegisterHandler <ErrorNotification>(ProcessNotification, ProcessNotificationException); RegisterHandler <Error>(ProcessError, ProcessErrorException); RegisterHandler <WebHookNotification>(ProcessWebHookNotification, ProcessWebHookNotificationException); }
public void CanCalculateTimeBuckets() { var bucket = ErrorStatsHelper.GetTimeBucket(new DateTimeOffset(2012, 11, 16, 0, 13, 43, TimeSpan.FromHours(-0))); Assert.Equal(0, bucket); bucket = ErrorStatsHelper.GetTimeBucket(new DateTimeOffset(2012, 11, 16, 0, 15, 43, TimeSpan.FromHours(-0))); Assert.Equal(15, bucket); bucket = ErrorStatsHelper.GetTimeBucket(new DateTimeOffset(2012, 11, 16, 23, 59, 59, TimeSpan.FromHours(-0))); Assert.Equal(1425, bucket); var buckets = new List <int>(); for (int i = 0; i < 1440; i += 15) { buckets.Add(i); } Assert.Equal(96, buckets.Count); }
public DataHelper(OrganizationRepository organizationRepository, ProjectRepository projectRepository, UserRepository userRepository, ErrorRepository errorRepository, ErrorStackRepository errorStackRepository, DayStackStatsRepository dayStackStats, MonthStackStatsRepository monthStackStats, DayProjectStatsRepository dayProjectStats, MonthProjectStatsRepository monthProjectStats, ErrorStatsHelper errorStatsHelper, BillingManager billingManager) { _organizationRepository = organizationRepository; _projectRepository = projectRepository; _userRepository = userRepository; _errorRepository = errorRepository; _errorStackRepository = errorStackRepository; _dayStackStats = dayStackStats; _monthStackStats = monthStackStats; _dayProjectStats = dayProjectStats; _monthProjectStats = monthProjectStats; _statsHelper = errorStatsHelper; _billingManager = billingManager; }