Skip to content

batch_get_frame_metric_data async

batch_get_frame_metric_data(
    profiling_group_name: ProfilingGroupName,
    *,
    config_overrides: Optional[AsyncCodeGuruProfilerClientConfig] = None,
    start_time: Optional[Timestamp] = None,
    end_time: Optional[Timestamp] = None,
    period: Optional[Period] = None,
    target_resolution: Optional[AggregationPeriod] = None,
    frame_metrics: Optional[FrameMetrics] = None,
) -> BatchGetFrameMetricDataResponse

Returns the time series of values for a requested list of frame metrics from a time period.

Parameters:

  • profiling_group_name (ProfilingGroupName) –

    The name of the profiling group associated with the the frame metrics used to return the time series values.

  • start_time (Optional[Timestamp], default: None ) –

    The start time of the time period for the frame metrics used to return the time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

  • end_time (Optional[Timestamp], default: None ) –

    The end time of the time period for the returned time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

  • period (Optional[Period], default: None ) –

    The duration of the frame metrics used to return the time series values. Specify using the ISO 8601 format. The maximum period duration is one day (PT24H or P1D).

  • target_resolution (Optional[AggregationPeriod], default: None ) –

    The requested resolution of time steps for the returned time series of values. If the requested target resolution is not available due to data not being retained we provide a best effort result by falling back to the most granular available resolution after the target resolution. There are 3 valid values.

    • P1D — 1 day

    • PT1H — 1 hour

    • PT5M — 5 minutes

  • frame_metrics (Optional[FrameMetrics], default: None ) –

    The details of the metrics that are used to request a time series of values. The metric includes the name of the frame, the aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for the metric value of the frame.

Raises:

Source code in docs_src/capo_codeguruprofiler/_services/async_code_guru_profiler.py
async def batch_get_frame_metric_data(
    self,
    profiling_group_name: "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName",
    *,
    config_overrides: Optional[AsyncCodeGuruProfilerClientConfig] = None,
    start_time: Optional["capo_codeguruprofiler.types.timestamp.Timestamp"] = None,
    end_time: Optional["capo_codeguruprofiler.types.timestamp.Timestamp"] = None,
    period: Optional["capo_codeguruprofiler.types.period.Period"] = None,
    target_resolution: Optional[
        "capo_codeguruprofiler.types.aggregation_period.AggregationPeriod"
    ] = None,
    frame_metrics: Optional[
        "capo_codeguruprofiler.types.frame_metrics.FrameMetrics"
    ] = None,
) -> "capo_codeguruprofiler.types.batch_get_frame_metric_data_response.BatchGetFrameMetricDataResponse":
    """<p> Returns the time series of values for a requested list of frame metrics from a time period.</p>

    Args:
        profiling_group_name: <p> The name of the profiling group associated with the the frame metrics used to return the time series values. </p>
        start_time: <p> The start time of the time period for the frame metrics used to return the time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
        end_time: <p> The end time of the time period for the returned time series values. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>
        period: <p> The duration of the frame metrics used to return the time series values. Specify using the ISO 8601 format. The maximum period duration is one day (<code>PT24H</code> or <code>P1D</code>). </p>
        target_resolution: <p>The requested resolution of time steps for the returned time series of values. If the requested target resolution is not available due to data not being retained we provide a best effort result by falling back to the most granular available resolution after the target resolution. There are 3 valid values. </p> <ul> <li> <p> <code>P1D</code> — 1 day </p> </li> <li> <p> <code>PT1H</code> — 1 hour </p> </li> <li> <p> <code>PT5M</code> — 5 minutes </p> </li> </ul>
        frame_metrics: <p> The details of the metrics that are used to request a time series of values. The metric includes the name of the frame, the aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for the metric value of the frame.</p>

    Raises:
        capo_codeguruprofiler.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_codeguruprofiler.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
        capo_codeguruprofiler.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_codeguruprofiler.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_codeguruprofiler.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codeguruprofiler.types.batch_get_frame_metric_data_request.BatchGetFrameMetricDataRequest]",
    ) -> AsyncOperationResponse[
        "capo_codeguruprofiler.types.batch_get_frame_metric_data_response.BatchGetFrameMetricDataResponse"
    ]:
        import capo_codeguruprofiler._operations.code_guru_profiler.batch_get_frame_metric_data

        (
            output,
            http_response,
        ) = await capo_codeguruprofiler._operations.code_guru_profiler.batch_get_frame_metric_data.async_batch_get_frame_metric_data(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetFrameMetricData")
    )
    input_: capo_codeguruprofiler.types.batch_get_frame_metric_data_request.BatchGetFrameMetricDataRequest = {
        "profiling_group_name": profiling_group_name
    }
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time
    if period is not None:
        input_["period"] = period
    if target_resolution is not None:
        input_["target_resolution"] = target_resolution
    if frame_metrics is not None:
        input_["frame_metrics"] = frame_metrics

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output