Exemplo n.º 1
0
 public SiloStatisticsManager(
     IOptions <SiloStatisticsOptions> statisticsOptions,
     IOptions <LoadSheddingOptions> loadSheddingOptions,
     IOptions <StorageOptions> azureStorageOptions,
     ILocalSiloDetails siloDetails,
     SerializationManager serializationManager,
     ITelemetryProducer telemetryProducer,
     IHostEnvironmentStatistics hostEnvironmentStatistics,
     IAppEnvironmentStatistics appEnvironmentStatistics,
     ILoggerFactory loggerFactory,
     IOptions <SiloMessagingOptions> messagingOptions)
 {
     this.siloDetails    = siloDetails;
     this.storageOptions = azureStorageOptions.Value;
     MessagingStatisticsGroup.Init(true);
     MessagingProcessingStatisticsGroup.Init();
     NetworkingStatisticsGroup.Init(true);
     ApplicationRequestsStatisticsGroup.Init(messagingOptions.Value.ResponseTimeout);
     SchedulerStatisticsGroup.Init(loggerFactory);
     StorageStatisticsGroup.Init();
     TransactionsStatisticsGroup.Init();
     this.logger = loggerFactory.CreateLogger <SiloStatisticsManager>();
     this.hostEnvironmentStatistics = hostEnvironmentStatistics;
     this.logStatistics             = new LogStatistics(statisticsOptions.Value.LogWriteInterval, true, serializationManager, loggerFactory);
     this.MetricsTable      = new SiloPerformanceMetrics(this.hostEnvironmentStatistics, appEnvironmentStatistics, loggerFactory, loadSheddingOptions);
     this.countersPublisher = new CountersStatistics(statisticsOptions.Value.PerfCountersWriteInterval, telemetryProducer, loggerFactory);
 }
Exemplo n.º 2
0
 public SiloStatisticsManager(
     IOptions <StatisticsOptions> statisticsOptions,
     ITelemetryProducer telemetryProducer,
     ILoggerFactory loggerFactory)
 {
     MessagingStatisticsGroup.Init();
     MessagingProcessingStatisticsGroup.Init();
     NetworkingStatisticsGroup.Init();
     StorageStatisticsGroup.Init();
     this.logStatistics     = new LogStatistics(statisticsOptions.Value.LogWriteInterval, true, loggerFactory);
     this.countersPublisher = new CountersStatistics(statisticsOptions.Value.PerfCountersWriteInterval, telemetryProducer, loggerFactory);
 }
Exemplo n.º 3
0
 internal SiloStatisticsManager(GlobalConfiguration globalConfig, NodeConfiguration nodeConfig)
 {
     MessagingStatisticsGroup.Init(true);
     MessagingProcessingStatisticsGroup.Init();
     NetworkingStatisticsGroup.Init(true);
     ApplicationRequestsStatisticsGroup.Init(globalConfig.ResponseTimeout);
     SchedulerStatisticsGroup.Init();
     StorageStatisticsGroup.Init();
     runtimeStats = new RuntimeStatisticsGroup();
     logStatistics = new LogStatistics(nodeConfig.StatisticsLogWriteInterval, true);
     MetricsTable = new SiloPerformanceMetrics(runtimeStats, nodeConfig);
     countersPublisher = new CountersStatistics(nodeConfig.StatisticsPerfCountersWriteInterval);
 }
 internal SiloStatisticsManager(GlobalConfiguration globalConfig, NodeConfiguration nodeConfig)
 {
     MessagingStatisticsGroup.Init(true);
     MessagingProcessingStatisticsGroup.Init();
     NetworkingStatisticsGroup.Init(true);
     ApplicationRequestsStatisticsGroup.Init(globalConfig.ResponseTimeout);
     SchedulerStatisticsGroup.Init();
     StorageStatisticsGroup.Init();
     runtimeStats      = new RuntimeStatisticsGroup();
     logStatistics     = new LogStatistics(nodeConfig.StatisticsLogWriteInterval, true);
     MetricsTable      = new SiloPerformanceMetrics(runtimeStats, nodeConfig);
     countersPublisher = new CountersStatistics(nodeConfig.StatisticsPerfCountersWriteInterval);
 }
 internal void Stop()
 {
     if (countersPublisher != null)
     {
         countersPublisher.Stop();
     }
     countersPublisher = null;
     if (logStatistics != null)
     {
         logStatistics.Stop();
         logStatistics.DumpCounters();
     }
     logStatistics = null;
 }
 public SiloStatisticsManager(
     IOptions <SiloStatisticsOptions> statisticsOptions,
     SerializationManager serializationManager,
     ITelemetryProducer telemetryProducer,
     ILoggerFactory loggerFactory)
 {
     MessagingStatisticsGroup.Init(true);
     MessagingProcessingStatisticsGroup.Init();
     NetworkingStatisticsGroup.Init(true);
     ApplicationRequestsStatisticsGroup.Init();
     SchedulerStatisticsGroup.Init(loggerFactory);
     StorageStatisticsGroup.Init();
     TransactionsStatisticsGroup.Init();
     this.logStatistics     = new LogStatistics(statisticsOptions.Value.LogWriteInterval, true, serializationManager, loggerFactory);
     this.countersPublisher = new CountersStatistics(statisticsOptions.Value.PerfCountersWriteInterval, telemetryProducer, loggerFactory);
 }
Exemplo n.º 7
0
 public SiloStatisticsManager(NodeConfiguration nodeConfiguration, ILocalSiloDetails siloDetails, SerializationManager serializationManager, ITelemetryProducer telemetryProducer, ILoggerFactory loggerFactory, IOptions <MessagingOptions> messagingOptions)
 {
     this.siloDetails = siloDetails;
     MessagingStatisticsGroup.Init(true);
     MessagingProcessingStatisticsGroup.Init();
     NetworkingStatisticsGroup.Init(true);
     ApplicationRequestsStatisticsGroup.Init(messagingOptions.Value.ResponseTimeout);
     SchedulerStatisticsGroup.Init(loggerFactory);
     StorageStatisticsGroup.Init();
     TransactionsStatisticsGroup.Init();
     this.logger            = loggerFactory.CreateLogger <SiloStatisticsManager>();
     runtimeStats           = new RuntimeStatisticsGroup(loggerFactory);
     this.logStatistics     = new LogStatistics(nodeConfiguration.StatisticsLogWriteInterval, true, serializationManager, loggerFactory);
     this.MetricsTable      = new SiloPerformanceMetrics(this.runtimeStats, loggerFactory, nodeConfiguration);
     this.countersPublisher = new CountersStatistics(nodeConfiguration.StatisticsPerfCountersWriteInterval, telemetryProducer, loggerFactory);
 }
        public SiloStatisticsManager(SiloInitializationParameters initializationParams)
        {
            MessagingStatisticsGroup.Init(true);
            MessagingProcessingStatisticsGroup.Init();
            NetworkingStatisticsGroup.Init(true);
            ApplicationRequestsStatisticsGroup.Init(initializationParams.GlobalConfig.ResponseTimeout);
            SchedulerStatisticsGroup.Init();
            StorageStatisticsGroup.Init();
            runtimeStats           = new RuntimeStatisticsGroup();
            this.logStatistics     = new LogStatistics(initializationParams.NodeConfig.StatisticsLogWriteInterval, true);
            this.MetricsTable      = new SiloPerformanceMetrics(this.runtimeStats, initializationParams.NodeConfig);
            this.countersPublisher = new CountersStatistics(initializationParams.NodeConfig.StatisticsPerfCountersWriteInterval);

            initializationParams.ClusterConfig.OnConfigChange(
                "Defaults/LoadShedding",
                () => this.MetricsTable.NodeConfig = initializationParams.NodeConfig,
                false);
        }
Exemplo n.º 9
0
 internal void Stop()
 {
     if (MetricsTable != null)
     {
         MetricsTable.Dispose();
     }
     MetricsTable = null;
     if (countersPublisher != null)
     {
         countersPublisher.Stop();
     }
     countersPublisher = null;
     if (logStatistics != null)
     {
         logStatistics.Stop();
         logStatistics.DumpCounters().Wait();
     }
     logStatistics = null;
 }
Exemplo n.º 10
0
        public SiloStatisticsManager(SiloInitializationParameters initializationParams, SerializationManager serializationManager, ITelemetryProducer telemetryProducer, ILoggerFactory loggerFactory)
        {
            MessagingStatisticsGroup.Init(true);
            MessagingProcessingStatisticsGroup.Init();
            NetworkingStatisticsGroup.Init(true);
            ApplicationRequestsStatisticsGroup.Init(initializationParams.ClusterConfig.Globals.ResponseTimeout);
            SchedulerStatisticsGroup.Init(loggerFactory);
            StorageStatisticsGroup.Init();
            TransactionsStatisticsGroup.Init();
            this.logger            = new LoggerWrapper <SiloStatisticsManager>(loggerFactory);
            runtimeStats           = new RuntimeStatisticsGroup(loggerFactory);
            this.logStatistics     = new LogStatistics(initializationParams.NodeConfig.StatisticsLogWriteInterval, true, serializationManager, loggerFactory);
            this.MetricsTable      = new SiloPerformanceMetrics(this.runtimeStats, loggerFactory, initializationParams.NodeConfig);
            this.countersPublisher = new CountersStatistics(initializationParams.NodeConfig.StatisticsPerfCountersWriteInterval, telemetryProducer, loggerFactory);

            initializationParams.ClusterConfig.OnConfigChange(
                "Defaults/LoadShedding",
                () => this.MetricsTable.NodeConfig = initializationParams.NodeConfig,
                false);
        }
Exemplo n.º 11
0
 internal void Stop()
 {
     if (runtimeStats != null)
         runtimeStats.Stop();
     runtimeStats = null;
     if (MetricsTable != null)
         MetricsTable.Dispose();
     MetricsTable = null;
     if (countersPublisher != null)
         countersPublisher.Stop();
     countersPublisher = null;
     if (logStatistics != null)
     {
         logStatistics.Stop();
         logStatistics.DumpCounters().Wait();
     }
     logStatistics = null;
 }