public IActionResult GetMetricsByPercentileFromAgent( [FromRoute] RamMetricGetByIntervalForAgentRequest request, [FromRoute] Percentile percentile) { _logger.LogDebug("Вызов метода. Параметры:" + $" {nameof(request.AgentId)} = {request.AgentId}" + $" {nameof(request.FromTime)} = {request.FromTime}" + $" {nameof(request.ToTime)} = {request.ToTime}" + $" {nameof(percentile)} = {percentile}"); var metrics = _repository.GetByTimeIntervalPercentile(request.AgentId, request.FromTime, request.ToTime, percentile); var response = new AllMetricsResponse <RamMetricDto>(); foreach (var metric in metrics.Metrics) { response.Metrics.Add(_mapper.Map <RamMetricDto>(metric)); } return(Ok(response)); }