public async Task<List<double>> FilterData(MonitoringQuery query)
        {
            IEnumerable<InMemoryTimeValue> data = _monitoringData;

            if (query.DateFrom.HasValue)
                data = data.Where(x => x.Date >= query.DateFrom);

            if (query.DateTo.HasValue)
                data = data.Where(x => x.Date <= query.DateTo);

            if (query.SinceDate.HasValue)
                data = data.Where(x => x.Date >= query.SinceDate);

            if (query.SinceMinute.HasValue)
            {
                var nowWithoutMinute = DateTime.UtcNow.AddMinutes(-query.SinceMinute.Value);
                data = data.Where(x => x.Date >= nowWithoutMinute);
            }

            //by default - 5 minutes
            if (query.IsEmpty)
            {
                var defaultLastTime = DateTime.UtcNow.AddMinutes(-5);
                data = data.Where(x => x.Date > defaultLastTime);
            }

            return await Task.FromResult(data.Select(y => y.Value).ToList());
        }
        public async Task<ServerPullData> PullAsync(MonitoringQuery query)
        {
            var server = _servers.GetOrAdd(query.Server.Id, hash => new ServerInfo());

            var serverData = _serversData.GetOrAdd(query.Server.Id, hash => new InMemoryServerData()).ToList();

            if(!serverData.Any())
                return new ServerPullData();

            var items = new List<ServerStatisticsDataItem>();

            foreach (var sData in serverData)
            {
                var item = new ServerStatisticsDataItem
                {
                    Name = sData.Key,
                    Order = sData.Value.Order,
                    CurrentValue = await sData.Value.LastValue(),
                    CurrentValueDisplay = sData.Value.Display,
                    Type = sData.Value.Type,
                    Data = await sData.Value.FilterData(query)
                };

                items.Add(item);
            }

            var result = new ServerPullData { LastPush = server.LastPush, Items = items.OrderBy(x => x.Order) };

            return await Task.FromResult(result);
        }