/// <inheritdoc />
        public async Task Execute(IJobExecutionContext context)
        {
            _logger.LogInformation($"Get stats for Oltp");
            var servers = _configuration.OltpPool;

            foreach (var server in servers)
            {
                var stats = await _repository.GetStatistics(server);

                _storage.Set(QueryType.Oltp, server, stats);
            }
        }
Example #2
0
 /// <summary>
 /// Add statistics (Online=true,SessionsCount) to chosen storage.
 /// </summary>
 protected static void SetLocalhostStatisticsAsOnline(IStatisticsStorage storage, int sessionsCount = 1)
 {
     storage.Set(QueryType.Oltp, new Server(), new Statistics {
         IsOnline = true, CurrentSessionsCount = sessionsCount
     });
 }