コード例 #1
0
 internal ClientTableStatistics(IMessageCenter mc, IClientMetricsDataPublisher metricsDataPublisher, RuntimeStatisticsGroup runtime)
 {
     this.mc = mc;
     this.metricsDataPublisher = metricsDataPublisher;
     runtimeStats = runtime;
     reportFrequency = TimeSpan.Zero;
     connectedGatewayCount = IntValueStatistic.Find(StatisticNames.CLIENT_CONNECTED_GATEWAY_COUNT);
 }
コード例 #2
0
        internal ClientStatisticsManager(ClientConfiguration config)
        {
            this.config = config;
            runtimeStats = new RuntimeStatisticsGroup();
            logStatistics = new LogStatistics(config.StatisticsLogWriteInterval, false);
            logger = LogManager.GetLogger(GetType().Name);

            MessagingStatisticsGroup.Init(false);
            NetworkingStatisticsGroup.Init(false);
            ApplicationRequestsStatisticsGroup.Init(config.ResponseTimeout);
        }
コード例 #3
0
 public void Dispose()
 {
     if (runtimeStats != null)
     {
         runtimeStats.Dispose();
     }
     runtimeStats = null;
     if (logStatistics != null)
     {
         logStatistics.Dispose();
     }
     logStatistics = null;
 }
コード例 #4
0
 public ClientStatisticsManager(ClientConfiguration config, SerializationManager serializationManager, IServiceProvider serviceProvider, ILoggerFactory loggerFactory, IOptions <StatisticsOptions> statisticsOptions)
 {
     this.config            = config;
     this.statisticsOptions = statisticsOptions.Value;
     this.serviceProvider   = serviceProvider;
     runtimeStats           = new RuntimeStatisticsGroup(loggerFactory);
     logStatistics          = new LogStatistics(this.statisticsOptions.LogWriteInterval, false, serializationManager, loggerFactory);
     logger             = loggerFactory.CreateLogger <ClientStatisticsManager>();
     this.loggerFactory = loggerFactory;
     MessagingStatisticsGroup.Init(false);
     NetworkingStatisticsGroup.Init(false);
     ApplicationRequestsStatisticsGroup.Init(config.ResponseTimeout);
 }
コード例 #5
0
        internal void Stop()
        {
            runtimeStats?.Stop();
            runtimeStats = null;

            if (logStatistics != null)
            {
                logStatistics.Stop();
                logStatistics.DumpCounters().WaitWithThrow(TimeSpan.FromSeconds(10));
            }

            logStatistics = null;

            tableStatistics?.Dispose();
            tableStatistics = null;
        }
コード例 #6
0
 internal ClientTableStatistics(IMessageCenter mc, IClientMetricsDataPublisher metricsDataPublisher, RuntimeStatisticsGroup runtime)
 {
     this.mc = mc;
     this.metricsDataPublisher = metricsDataPublisher;
     runtimeStats          = runtime;
     reportFrequency       = TimeSpan.Zero;
     connectedGatewayCount = IntValueStatistic.Find(StatisticNames.CLIENT_CONNECTED_GATEWAY_COUNT);
 }
コード例 #7
0
 internal ClientStatisticsManager(IStatisticsConfiguration config)
 {
     runtimeStats  = new RuntimeStatisticsGroup();
     logStatistics = new LogStatistics(config.StatisticsLogWriteInterval, false);
 }
コード例 #8
0
 internal ClientStatisticsManager(IStatisticsConfiguration config)
 {
     runtimeStats = new RuntimeStatisticsGroup();
     logStatistics = new LogStatistics(config.StatisticsLogWriteInterval, false);
     logger = TraceLogger.GetLogger(GetType().Name);
 }
コード例 #9
0
        internal void Stop()
        {
            if (runtimeStats != null)
                runtimeStats.Stop();

            runtimeStats = null;

            if (logStatistics != null)
            {
                logStatistics.Stop();
                logStatistics.DumpCounters().WaitWithThrow(TimeSpan.FromSeconds(10));
            }

            logStatistics = null;

            if (tableStatistics != null)
                tableStatistics.Dispose();

            tableStatistics = null;
        }
コード例 #10
0
 public void Dispose()
 {
     if (runtimeStats != null)
         runtimeStats.Dispose();
     runtimeStats = null;
     if (logStatistics != null)
         logStatistics.Dispose();
     logStatistics = null;
 }
コード例 #11
0
 internal ClientTableStatistics(IMessageCenter mc, IClientMetricsDataPublisher metricsDataPublisher, RuntimeStatisticsGroup runtime, ILoggerFactory loggerFactory)
 {
     this.mc = mc;
     this.metricsDataPublisher = metricsDataPublisher;
     this.logger = loggerFactory.CreateLogger <ClientTableStatistics>();
     //async timer created through current class all share this logger for perf reasons
     this.timerLogger      = loggerFactory.CreateLogger <AsyncTaskSafeTimer>();
     runtimeStats          = runtime;
     reportFrequency       = TimeSpan.Zero;
     connectedGatewayCount = IntValueStatistic.Find(StatisticNames.CLIENT_CONNECTED_GATEWAY_COUNT);
 }
コード例 #12
0
 internal ClientStatisticsManager(IStatisticsConfiguration config)
 {
     runtimeStats  = new RuntimeStatisticsGroup();
     logStatistics = new LogStatistics(config.StatisticsLogWriteInterval, false);
     logger        = TraceLogger.GetLogger(GetType().Name);
 }