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); }
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); }
public void Dispose() { if (runtimeStats != null) { runtimeStats.Dispose(); } runtimeStats = null; if (logStatistics != null) { logStatistics.Dispose(); } logStatistics = null; }
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); }
internal void Stop() { runtimeStats?.Stop(); runtimeStats = null; if (logStatistics != null) { logStatistics.Stop(); logStatistics.DumpCounters().WaitWithThrow(TimeSpan.FromSeconds(10)); } logStatistics = null; tableStatistics?.Dispose(); tableStatistics = null; }
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); }
internal ClientStatisticsManager(IStatisticsConfiguration config) { runtimeStats = new RuntimeStatisticsGroup(); logStatistics = new LogStatistics(config.StatisticsLogWriteInterval, false); }
internal ClientStatisticsManager(IStatisticsConfiguration config) { runtimeStats = new RuntimeStatisticsGroup(); logStatistics = new LogStatistics(config.StatisticsLogWriteInterval, false); logger = TraceLogger.GetLogger(GetType().Name); }
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; }
public void Dispose() { if (runtimeStats != null) runtimeStats.Dispose(); runtimeStats = null; if (logStatistics != null) logStatistics.Dispose(); logStatistics = null; }
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); }
internal ClientStatisticsManager(IStatisticsConfiguration config) { runtimeStats = new RuntimeStatisticsGroup(); logStatistics = new LogStatistics(config.StatisticsLogWriteInterval, false); logger = TraceLogger.GetLogger(GetType().Name); }