Ejemplo n.º 1
0
 public UpdateStatsAction(ErrorStatsHelper statsHelper, OrganizationRepository organizationRepository, ProjectRepository projectRepository, ErrorStackRepository errorStackRepository)
 {
     _organizationRepository = organizationRepository;
     _projectRepository      = projectRepository;
     _errorStackRepository   = errorStackRepository;
     _statsHelper            = statsHelper;
 }
Ejemplo n.º 2
0
 public StatsController(ErrorStatsHelper statsHelper, IOrganizationRepository organizationRepository, IErrorStackRepository errorStackRepository, IProjectRepository projectRepository, ICacheClient cacheClient)
 {
     _cacheClient            = cacheClient;
     _statsHelper            = statsHelper;
     _organizationRepository = organizationRepository;
     _errorStackRepository   = errorStackRepository;
     _projectRepository      = projectRepository;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
 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;
 }