capo-codeguruprofiler 0.13.0__tar.gz → 0.14.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {capo_codeguruprofiler-0.13.0/src/capo_codeguruprofiler.egg-info → capo_codeguruprofiler-0.14.0}/PKG-INFO +3 -1
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/README.md +2 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/pyproject.toml +1 -1
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_services/_aws_config.py +15 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_services/_pipeline.py +207 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_services/async_code_guru_profiler.py +12 -1
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_services/code_guru_profiler.py +12 -1
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0/src/capo_codeguruprofiler.egg-info}/PKG-INFO +3 -1
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/LICENSE +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/setup.cfg +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/__init__.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_async.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_auth/_identity.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_auth/_providers.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_auth/_signers.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_auth/_sigv4.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_auth/_zapros_handler.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_aws.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_body.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_iter.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/add_notification_channels.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/batch_get_frame_metric_data.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/configure_agent.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/create_profiling_group.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/delete_profiling_group.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/describe_profiling_group.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/get_findings_report_account_summary.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/get_notification_configuration.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/get_policy.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/get_profile.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/get_recommendations.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/list_findings_reports.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/list_profile_times.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/list_profiling_groups.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/list_tags_for_resource.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/post_agent_profile.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/put_permission.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/remove_notification_channel.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/remove_permission.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/submit_feedback.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/tag_resource.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/untag_resource.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_operations/code_guru_profiler/update_profiling_group.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_pagination.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_protocol/__init__.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_protocol/errors.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_protocol/eventstream.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_protocol/serialize.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_protocol/xml.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_resources/code_guru_profiler/profiling_group.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_rule_engine/__init__.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_rule_engine/_aws_partition.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_rule_engine/_endpoint_rule_set.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_rule_engine/_endpoint_runtime.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/errors/__init__.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/errors/_base.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/errors/conflict_exception.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/errors/internal_server_exception.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/errors/resource_not_found_exception.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/errors/service_quota_exceeded_exception.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/errors/throttling_exception.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/errors/validation_exception.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/py.typed +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/_prelude/blob.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/_prelude/timestamp.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/_unknown.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/action_group.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/add_notification_channels_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/add_notification_channels_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/agent_configuration.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/agent_orchestration_config.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/agent_parameter_field.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/agent_parameters.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/agent_profile.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/aggregated_profile.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/aggregated_profile_time.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/aggregation_period.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/anomalies.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/anomaly.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/anomaly_instance.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/anomaly_instance_id.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/anomaly_instances.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/batch_get_frame_metric_data_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/batch_get_frame_metric_data_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/channel.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/channel_id.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/channel_uri.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/channels.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/client_token.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/compute_platform.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/configure_agent_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/configure_agent_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/create_profiling_group_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/create_profiling_group_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/delete_profiling_group_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/delete_profiling_group_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/describe_profiling_group_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/describe_profiling_group_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/event_publisher.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/event_publishers.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/feedback_type.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/findings_report_id.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/findings_report_summaries.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/findings_report_summary.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/fleet_instance_id.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/frame_metric.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/frame_metric_data.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/frame_metric_datum.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/frame_metric_value.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/frame_metric_values.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/frame_metrics.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_findings_report_account_summary_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_findings_report_account_summary_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_notification_configuration_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_notification_configuration_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_policy_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_policy_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_profile_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_profile_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_recommendations_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/get_recommendations_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/list_findings_reports_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/list_findings_reports_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/list_of_timestamps.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/list_profile_times_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/list_profile_times_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/list_profiling_groups_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/list_profiling_groups_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/list_tags_for_resource_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/list_tags_for_resource_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/locale.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/match.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/matches.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/max_depth.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/max_results.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/metadata.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/metadata_field.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/metric.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/metric_type.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/notification_configuration.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/order_by.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/pagination_token.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/pattern.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/percentage.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/period.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/post_agent_profile_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/post_agent_profile_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/principal.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/principals.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/profile_time.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/profile_times.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/profiling_group_arn.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/profiling_group_description.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/profiling_group_descriptions.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/profiling_group_name.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/profiling_group_names.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/profiling_status.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/put_permission_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/put_permission_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/recommendation.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/recommendations.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/remove_notification_channel_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/remove_notification_channel_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/remove_permission_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/remove_permission_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/revision_id.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/strings.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/submit_feedback_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/submit_feedback_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/tag_keys.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/tag_resource_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/tag_resource_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/tags_map.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/target_frame.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/target_frames.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/thread_states.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/timestamp.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/timestamp_structure.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/unprocessed_end_time_map.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/untag_resource_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/untag_resource_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/update_profiling_group_request.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/update_profiling_group_response.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/types/user_feedback.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler.egg-info/SOURCES.txt +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler.egg-info/dependency_links.txt +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler.egg-info/requires.txt +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler.egg-info/top_level.txt +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/tests/test_body.py +0 -0
- {capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/tests/test_sigv4.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: capo-codeguruprofiler
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.0
|
|
4
4
|
Summary: Typed, async Python SDK for AWS Codeguruprofiler.
|
|
5
5
|
Project-URL: Homepage, https://capo-sdk.dev/
|
|
6
6
|
Project-URL: Documentation, https://capo-sdk.dev/services/codeguruprofiler/
|
|
@@ -94,6 +94,8 @@ The SDK retries failed operations automatically. Retry behaviour follows the Smi
|
|
|
94
94
|
|
|
95
95
|
The number of attempts defaults to 3 and can be changed at the client level via `retry_max_attempts`, or per call via `config_overrides`.
|
|
96
96
|
|
|
97
|
+
`retry_mode="adaptive"` (or `AWS_RETRY_MODE=adaptive`, or `retry_mode = adaptive` in the AWS profile) also slows the whole client down once the service starts throttling it, then speeds back up as requests succeed. The default is `standard`.
|
|
98
|
+
|
|
97
99
|
```python
|
|
98
100
|
from capo_codeguruprofiler import AsyncCodeGuruProfilerClient
|
|
99
101
|
|
|
@@ -62,6 +62,8 @@ The SDK retries failed operations automatically. Retry behaviour follows the Smi
|
|
|
62
62
|
|
|
63
63
|
The number of attempts defaults to 3 and can be changed at the client level via `retry_max_attempts`, or per call via `config_overrides`.
|
|
64
64
|
|
|
65
|
+
`retry_mode="adaptive"` (or `AWS_RETRY_MODE=adaptive`, or `retry_mode = adaptive` in the AWS profile) also slows the whole client down once the service starts throttling it, then speeds back up as requests succeed. The default is `standard`.
|
|
66
|
+
|
|
65
67
|
```python
|
|
66
68
|
from capo_codeguruprofiler import AsyncCodeGuruProfilerClient
|
|
67
69
|
|
|
@@ -31,6 +31,7 @@ class AwsSettings:
|
|
|
31
31
|
use_fips: bool
|
|
32
32
|
use_dual_stack: bool
|
|
33
33
|
max_attempts: int
|
|
34
|
+
retry_mode: str
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
def _env_bool(name: str) -> bool | None:
|
|
@@ -109,12 +110,22 @@ def load_aws_settings() -> AwsSettings:
|
|
|
109
110
|
use_dual_stack = False
|
|
110
111
|
max_attempts_raw = os.environ.get("AWS_MAX_ATTEMPTS") or profile.get("max_attempts")
|
|
111
112
|
max_attempts = int(max_attempts_raw) if max_attempts_raw else 3
|
|
113
|
+
retry_mode = (
|
|
114
|
+
(os.environ.get("AWS_RETRY_MODE") or profile.get("retry_mode") or "standard")
|
|
115
|
+
.strip()
|
|
116
|
+
.lower()
|
|
117
|
+
)
|
|
118
|
+
if retry_mode not in ("legacy", "standard", "adaptive"):
|
|
119
|
+
raise ValueError(
|
|
120
|
+
f"invalid retry_mode {retry_mode!r}: expected 'legacy', 'standard' or 'adaptive'"
|
|
121
|
+
)
|
|
112
122
|
return AwsSettings(
|
|
113
123
|
region=region,
|
|
114
124
|
endpoint=endpoint,
|
|
115
125
|
use_fips=use_fips,
|
|
116
126
|
use_dual_stack=use_dual_stack,
|
|
117
127
|
max_attempts=max_attempts,
|
|
128
|
+
retry_mode=retry_mode,
|
|
118
129
|
)
|
|
119
130
|
|
|
120
131
|
|
|
@@ -134,6 +145,8 @@ def aws_config() -> Interceptor[TInput, TOutput]:
|
|
|
134
145
|
options.use_dual_stack = settings.use_dual_stack
|
|
135
146
|
if options.retry_max_attempts is None:
|
|
136
147
|
options.retry_max_attempts = settings.max_attempts
|
|
148
|
+
if options.retry_mode is None:
|
|
149
|
+
options.retry_mode = settings.retry_mode
|
|
137
150
|
return next(request)
|
|
138
151
|
|
|
139
152
|
return interceptor
|
|
@@ -155,6 +168,8 @@ def aaws_config() -> AsyncInterceptor[TInput, TOutput]:
|
|
|
155
168
|
options.use_dual_stack = settings.use_dual_stack
|
|
156
169
|
if options.retry_max_attempts is None:
|
|
157
170
|
options.retry_max_attempts = settings.max_attempts
|
|
171
|
+
if options.retry_mode is None:
|
|
172
|
+
options.retry_mode = settings.retry_mode
|
|
158
173
|
return await next(request)
|
|
159
174
|
|
|
160
175
|
return interceptor
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
+
import math
|
|
4
5
|
import random
|
|
5
6
|
import threading
|
|
6
7
|
import time
|
|
@@ -88,15 +89,134 @@ class ThreadSafeRetryQuota(RetryQuota):
|
|
|
88
89
|
super().release(last_retry_cost)
|
|
89
90
|
|
|
90
91
|
|
|
92
|
+
class RateLimiter:
|
|
93
|
+
"""Send tokens shared by all operations of one client in adaptive retry mode: the rate drops on throttling and regrows on success."""
|
|
94
|
+
|
|
95
|
+
MIN_FILL_RATE: float = 0.5
|
|
96
|
+
MIN_CAPACITY: float = 1.0
|
|
97
|
+
BETA: float = 0.7
|
|
98
|
+
SCALE_CONSTANT: float = 0.4
|
|
99
|
+
SMOOTHING: float = 0.8
|
|
100
|
+
MAX_RATE_SCALE: float = 2.0
|
|
101
|
+
|
|
102
|
+
def __init__(self, clock: Callable[[], float] = time.monotonic) -> None:
|
|
103
|
+
self._clock = clock
|
|
104
|
+
now = clock()
|
|
105
|
+
self._enabled: bool = False
|
|
106
|
+
self._fill_rate: float = 1.0
|
|
107
|
+
self._max_capacity: float = 1.0
|
|
108
|
+
self._capacity: float = 0.0
|
|
109
|
+
self._last_refill: float = now
|
|
110
|
+
self._last_max_rate: float = 0.0
|
|
111
|
+
self._last_throttle: float = now
|
|
112
|
+
self._measured_rate: float = 0.0
|
|
113
|
+
self._rate_bucket: float = math.floor(now)
|
|
114
|
+
self._request_count: int = 0
|
|
115
|
+
|
|
116
|
+
def acquire(self) -> float:
|
|
117
|
+
"""Take a send token: return 0, or the seconds to wait before asking again."""
|
|
118
|
+
if not self._enabled:
|
|
119
|
+
return 0.0
|
|
120
|
+
self._refill(self._clock())
|
|
121
|
+
if self._capacity >= 1:
|
|
122
|
+
self._capacity -= 1
|
|
123
|
+
return 0.0
|
|
124
|
+
return (1 - self._capacity) / self._fill_rate
|
|
125
|
+
|
|
126
|
+
def update(self, is_throttling: bool) -> None:
|
|
127
|
+
"""Adjust the send rate after an attempt: cut it on throttling, regrow it otherwise."""
|
|
128
|
+
now = self._clock()
|
|
129
|
+
self._measure(now)
|
|
130
|
+
self._adjust(is_throttling, now)
|
|
131
|
+
|
|
132
|
+
def throttled_mid_stream(self) -> None:
|
|
133
|
+
"""Cut the send rate for throttling reported inside an open event stream. No new request was sent, so the measured rate is left alone."""
|
|
134
|
+
self._adjust(True, self._clock())
|
|
135
|
+
|
|
136
|
+
def _adjust(self, is_throttling: bool, now: float) -> None:
|
|
137
|
+
if is_throttling:
|
|
138
|
+
rate = (
|
|
139
|
+
min(self._measured_rate, self._fill_rate)
|
|
140
|
+
if self._enabled
|
|
141
|
+
else self._measured_rate
|
|
142
|
+
)
|
|
143
|
+
self._last_max_rate = rate
|
|
144
|
+
self._last_throttle = now
|
|
145
|
+
new_rate = rate * self.BETA
|
|
146
|
+
self._enabled = True
|
|
147
|
+
else:
|
|
148
|
+
window = (self._last_max_rate * (1 - self.BETA) / self.SCALE_CONSTANT) ** (
|
|
149
|
+
1 / 3
|
|
150
|
+
)
|
|
151
|
+
new_rate = (
|
|
152
|
+
self.SCALE_CONSTANT * (now - self._last_throttle - window) ** 3
|
|
153
|
+
+ self._last_max_rate
|
|
154
|
+
)
|
|
155
|
+
self._set_rate(min(new_rate, self.MAX_RATE_SCALE * self._measured_rate), now)
|
|
156
|
+
if is_throttling:
|
|
157
|
+
logger.debug(
|
|
158
|
+
"throttled, send rate lowered to %.2f requests/s",
|
|
159
|
+
self._fill_rate,
|
|
160
|
+
extra={"send_rate": self._fill_rate},
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
def _refill(self, now: float) -> None:
|
|
164
|
+
self._capacity = min(
|
|
165
|
+
self._max_capacity,
|
|
166
|
+
self._capacity + (now - self._last_refill) * self._fill_rate,
|
|
167
|
+
)
|
|
168
|
+
self._last_refill = now
|
|
169
|
+
|
|
170
|
+
def _measure(self, now: float) -> None:
|
|
171
|
+
# Requests per second, counted in half-second buckets and smoothed.
|
|
172
|
+
bucket = math.floor(now * 2) / 2
|
|
173
|
+
self._request_count += 1
|
|
174
|
+
if bucket > self._rate_bucket:
|
|
175
|
+
current = self._request_count / (bucket - self._rate_bucket)
|
|
176
|
+
self._measured_rate = current * self.SMOOTHING + self._measured_rate * (
|
|
177
|
+
1 - self.SMOOTHING
|
|
178
|
+
)
|
|
179
|
+
self._request_count = 0
|
|
180
|
+
self._rate_bucket = bucket
|
|
181
|
+
|
|
182
|
+
def _set_rate(self, rate: float, now: float) -> None:
|
|
183
|
+
self._refill(now)
|
|
184
|
+
self._fill_rate = max(rate, self.MIN_FILL_RATE)
|
|
185
|
+
self._max_capacity = max(rate, self.MIN_CAPACITY)
|
|
186
|
+
self._capacity = min(self._capacity, self._max_capacity)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
class ThreadSafeRateLimiter(RateLimiter):
|
|
190
|
+
"""A ``RateLimiter`` that sync clients can share across threads."""
|
|
191
|
+
|
|
192
|
+
def __init__(self, clock: Callable[[], float] = time.monotonic) -> None:
|
|
193
|
+
super().__init__(clock)
|
|
194
|
+
self._lock: threading.Lock = threading.Lock()
|
|
195
|
+
|
|
196
|
+
def acquire(self) -> float:
|
|
197
|
+
with self._lock:
|
|
198
|
+
return super().acquire()
|
|
199
|
+
|
|
200
|
+
def update(self, is_throttling: bool) -> None:
|
|
201
|
+
with self._lock:
|
|
202
|
+
super().update(is_throttling)
|
|
203
|
+
|
|
204
|
+
def throttled_mid_stream(self) -> None:
|
|
205
|
+
with self._lock:
|
|
206
|
+
super().throttled_mid_stream()
|
|
207
|
+
|
|
208
|
+
|
|
91
209
|
@dataclass
|
|
92
210
|
class OperationOptions:
|
|
93
211
|
client: Client
|
|
94
212
|
retry_quota: RetryQuota
|
|
213
|
+
rate_limiter: RateLimiter
|
|
95
214
|
use_dual_stack: bool | None = None
|
|
96
215
|
use_fips: bool | None = None
|
|
97
216
|
region: str | None = None
|
|
98
217
|
endpoint: str | None = None
|
|
99
218
|
retry_max_attempts: int | None = None
|
|
219
|
+
retry_mode: str | None = None
|
|
100
220
|
credentials_provider: IdentityProvider[Credentials] | None = None
|
|
101
221
|
anonymous: bool | None = None
|
|
102
222
|
|
|
@@ -105,11 +225,13 @@ class OperationOptions:
|
|
|
105
225
|
class AsyncOperationOptions:
|
|
106
226
|
client: AsyncClient
|
|
107
227
|
retry_quota: RetryQuota
|
|
228
|
+
rate_limiter: RateLimiter
|
|
108
229
|
use_dual_stack: bool | None = None
|
|
109
230
|
use_fips: bool | None = None
|
|
110
231
|
region: str | None = None
|
|
111
232
|
endpoint: str | None = None
|
|
112
233
|
retry_max_attempts: int | None = None
|
|
234
|
+
retry_mode: str | None = None
|
|
113
235
|
credentials_provider: IdentityProvider[Credentials] | None = None
|
|
114
236
|
anonymous: bool | None = None
|
|
115
237
|
|
|
@@ -428,6 +550,91 @@ def aretry() -> AsyncInterceptor[TInput, TOutput]:
|
|
|
428
550
|
return interceptor
|
|
429
551
|
|
|
430
552
|
|
|
553
|
+
def rate_limit() -> Interceptor[TInput, TOutput]:
|
|
554
|
+
def interceptor(
|
|
555
|
+
request: OperationRequest[TInput], next: NextFn[TInput, TOutput]
|
|
556
|
+
) -> OperationResponse[TOutput]:
|
|
557
|
+
if request.options.retry_mode != "adaptive":
|
|
558
|
+
return next(request)
|
|
559
|
+
limiter = request.options.rate_limiter
|
|
560
|
+
while (wait := limiter.acquire()) > 0:
|
|
561
|
+
time.sleep(wait)
|
|
562
|
+
try:
|
|
563
|
+
response = next(request)
|
|
564
|
+
except Exception as exc:
|
|
565
|
+
limiter.update(isinstance(exc, ServiceError) and exc.is_throttling_error)
|
|
566
|
+
raise
|
|
567
|
+
limiter.update(False)
|
|
568
|
+
return response
|
|
569
|
+
|
|
570
|
+
return interceptor
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
def arate_limit() -> AsyncInterceptor[TInput, TOutput]:
|
|
574
|
+
async def interceptor(
|
|
575
|
+
request: AsyncOperationRequest[TInput], next: AsyncNextFn[TInput, TOutput]
|
|
576
|
+
) -> AsyncOperationResponse[TOutput]:
|
|
577
|
+
if request.options.retry_mode != "adaptive":
|
|
578
|
+
return await next(request)
|
|
579
|
+
limiter = request.options.rate_limiter
|
|
580
|
+
while (wait := limiter.acquire()) > 0:
|
|
581
|
+
await anysleep(wait)
|
|
582
|
+
try:
|
|
583
|
+
response = await next(request)
|
|
584
|
+
except Exception as exc:
|
|
585
|
+
limiter.update(isinstance(exc, ServiceError) and exc.is_throttling_error)
|
|
586
|
+
raise
|
|
587
|
+
limiter.update(False)
|
|
588
|
+
return response
|
|
589
|
+
|
|
590
|
+
return interceptor
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
def _on_event_stream_error(
|
|
594
|
+
exc: ServiceError, options: OperationOptions | AsyncOperationOptions
|
|
595
|
+
) -> None:
|
|
596
|
+
# An error event arrives after a 200 response, so raise_error never saw it:
|
|
597
|
+
# mark it by its code here. It is not retried, but adaptive mode slows down.
|
|
598
|
+
_apply_retry_rules(exc, exc.response)
|
|
599
|
+
if exc.is_throttling_error and options.retry_mode == "adaptive":
|
|
600
|
+
options.rate_limiter.throttled_mid_stream()
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
def watch_event_stream(output: Any, member: str, options: OperationOptions) -> None:
|
|
604
|
+
"""Wrap the event stream ``output[member]`` so the errors it raises get their retry flags and reach the rate limiter."""
|
|
605
|
+
if member not in output:
|
|
606
|
+
return
|
|
607
|
+
events = output[member]
|
|
608
|
+
|
|
609
|
+
def watched() -> Iterator[Any]:
|
|
610
|
+
try:
|
|
611
|
+
yield from events
|
|
612
|
+
except ServiceError as exc:
|
|
613
|
+
_on_event_stream_error(exc, options)
|
|
614
|
+
raise
|
|
615
|
+
|
|
616
|
+
output[member] = watched()
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
def awatch_event_stream(
|
|
620
|
+
output: Any, member: str, options: AsyncOperationOptions
|
|
621
|
+
) -> None:
|
|
622
|
+
"""Wrap the event stream ``output[member]`` so the errors it raises get their retry flags and reach the rate limiter."""
|
|
623
|
+
if member not in output:
|
|
624
|
+
return
|
|
625
|
+
events = output[member]
|
|
626
|
+
|
|
627
|
+
async def watched() -> AsyncIterator[Any]:
|
|
628
|
+
try:
|
|
629
|
+
async for event in events:
|
|
630
|
+
yield event
|
|
631
|
+
except ServiceError as exc:
|
|
632
|
+
_on_event_stream_error(exc, options)
|
|
633
|
+
raise
|
|
634
|
+
|
|
635
|
+
output[member] = watched()
|
|
636
|
+
|
|
637
|
+
|
|
431
638
|
def log_operation(operation_logging: OperationLogging) -> Interceptor[TInput, TOutput]:
|
|
432
639
|
operation = operation_logging.operation
|
|
433
640
|
redact_input = operation_logging.redact_input
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import uuid
|
|
4
4
|
import warnings
|
|
5
5
|
from collections.abc import AsyncIterator
|
|
6
|
-
from typing import TYPE_CHECKING, Any, Iterable, Optional
|
|
6
|
+
from typing import TYPE_CHECKING, Any, Iterable, Literal, Optional
|
|
7
7
|
|
|
8
8
|
from typing_extensions import Self, TypedDict
|
|
9
9
|
from zapros import AsyncBaseHandler, AsyncClient
|
|
@@ -29,9 +29,11 @@ from capo_codeguruprofiler._services._pipeline import (
|
|
|
29
29
|
AsyncOperationRequest,
|
|
30
30
|
AsyncOperationResponse,
|
|
31
31
|
OperationLogging,
|
|
32
|
+
RateLimiter,
|
|
32
33
|
RetryQuota,
|
|
33
34
|
aexecute_pipeline,
|
|
34
35
|
alog_operation,
|
|
36
|
+
arate_limit,
|
|
35
37
|
aretry,
|
|
36
38
|
)
|
|
37
39
|
|
|
@@ -114,6 +116,7 @@ if TYPE_CHECKING:
|
|
|
114
116
|
class AsyncCodeGuruProfilerClientConfig(TypedDict, total=False, closed=True):
|
|
115
117
|
operation_interceptors: Iterable[AsyncInterceptor[Any, Any]]
|
|
116
118
|
retry_max_attempts: int | None
|
|
119
|
+
retry_mode: Literal["standard", "adaptive"] | None
|
|
117
120
|
region: str | None
|
|
118
121
|
use_dual_stack: bool | None
|
|
119
122
|
use_fips: bool | None
|
|
@@ -129,6 +132,7 @@ class AsyncCodeGuruProfilerClient:
|
|
|
129
132
|
http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
|
|
130
133
|
operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
|
|
131
134
|
retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
|
|
135
|
+
retry_mode: ``"standard"`` (the default) or ``"adaptive"``, which also slows the whole client down when the service throttles it.
|
|
132
136
|
region: The value of the ``AWS::Region`` endpoint parameter.
|
|
133
137
|
use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
|
|
134
138
|
use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
|
|
@@ -143,6 +147,7 @@ class AsyncCodeGuruProfilerClient:
|
|
|
143
147
|
http_handler: AsyncBaseHandler | None = None,
|
|
144
148
|
operation_interceptors: Iterable[AsyncInterceptor[Any, Any]] | None = None,
|
|
145
149
|
retry_max_attempts: int | None = None,
|
|
150
|
+
retry_mode: Literal["standard", "adaptive"] | None = None,
|
|
146
151
|
region: str | None = None,
|
|
147
152
|
use_dual_stack: bool | None = None,
|
|
148
153
|
use_fips: bool | None = None,
|
|
@@ -159,6 +164,8 @@ class AsyncCodeGuruProfilerClient:
|
|
|
159
164
|
self._client = client.wrap_with_middleware(lambda next: AuthMiddleware(next))
|
|
160
165
|
# One retry quota for all of this client's operations.
|
|
161
166
|
self._retry_quota = RetryQuota()
|
|
167
|
+
# One send-rate limiter too, used when retry_mode is adaptive.
|
|
168
|
+
self._rate_limiter = RateLimiter()
|
|
162
169
|
if credentials is not None and credentials_provider is not None:
|
|
163
170
|
warnings.warn(
|
|
164
171
|
"Both credentials and credentials_provider given; provider takes precedence"
|
|
@@ -176,6 +183,7 @@ class AsyncCodeGuruProfilerClient:
|
|
|
176
183
|
{
|
|
177
184
|
"operation_interceptors": operation_interceptors or [],
|
|
178
185
|
"retry_max_attempts": retry_max_attempts,
|
|
186
|
+
"retry_mode": retry_mode,
|
|
179
187
|
"region": region,
|
|
180
188
|
"use_dual_stack": use_dual_stack,
|
|
181
189
|
"use_fips": use_fips,
|
|
@@ -203,12 +211,15 @@ class AsyncCodeGuruProfilerClient:
|
|
|
203
211
|
if operation_logging is not None:
|
|
204
212
|
interceptors_.append(alog_operation(operation_logging))
|
|
205
213
|
interceptors_.append(aretry())
|
|
214
|
+
interceptors_.append(arate_limit())
|
|
206
215
|
options_: AsyncOperationOptions = AsyncOperationOptions(
|
|
207
216
|
client=self._client,
|
|
208
217
|
retry_quota=self._retry_quota,
|
|
218
|
+
rate_limiter=self._rate_limiter,
|
|
209
219
|
retry_max_attempts=overrides.get(
|
|
210
220
|
"retry_max_attempts", self._config.get("retry_max_attempts")
|
|
211
221
|
),
|
|
222
|
+
retry_mode=overrides.get("retry_mode", self._config.get("retry_mode")),
|
|
212
223
|
region=overrides.get("region", self._config.get("region")),
|
|
213
224
|
use_dual_stack=overrides.get(
|
|
214
225
|
"use_dual_stack", self._config.get("use_dual_stack")
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import uuid
|
|
4
4
|
import warnings
|
|
5
5
|
from collections.abc import Iterator
|
|
6
|
-
from typing import TYPE_CHECKING, Any, Iterable, Optional
|
|
6
|
+
from typing import TYPE_CHECKING, Any, Iterable, Literal, Optional
|
|
7
7
|
|
|
8
8
|
from typing_extensions import Self, TypedDict
|
|
9
9
|
from zapros import BaseHandler, Client
|
|
@@ -29,9 +29,11 @@ from capo_codeguruprofiler._services._pipeline import (
|
|
|
29
29
|
OperationOptions,
|
|
30
30
|
OperationRequest,
|
|
31
31
|
OperationResponse,
|
|
32
|
+
ThreadSafeRateLimiter,
|
|
32
33
|
ThreadSafeRetryQuota,
|
|
33
34
|
execute_pipeline,
|
|
34
35
|
log_operation,
|
|
36
|
+
rate_limit,
|
|
35
37
|
retry,
|
|
36
38
|
)
|
|
37
39
|
|
|
@@ -114,6 +116,7 @@ if TYPE_CHECKING:
|
|
|
114
116
|
class CodeGuruProfilerClientConfig(TypedDict, total=False, closed=True):
|
|
115
117
|
operation_interceptors: Iterable[Interceptor[Any, Any]]
|
|
116
118
|
retry_max_attempts: int | None
|
|
119
|
+
retry_mode: Literal["standard", "adaptive"] | None
|
|
117
120
|
region: str | None
|
|
118
121
|
use_dual_stack: bool | None
|
|
119
122
|
use_fips: bool | None
|
|
@@ -129,6 +132,7 @@ class CodeGuruProfilerClient:
|
|
|
129
132
|
http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
|
|
130
133
|
operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
|
|
131
134
|
retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
|
|
135
|
+
retry_mode: ``"standard"`` (the default) or ``"adaptive"``, which also slows the whole client down when the service throttles it.
|
|
132
136
|
region: The value of the ``AWS::Region`` endpoint parameter.
|
|
133
137
|
use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
|
|
134
138
|
use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
|
|
@@ -143,6 +147,7 @@ class CodeGuruProfilerClient:
|
|
|
143
147
|
http_handler: BaseHandler | None = None,
|
|
144
148
|
operation_interceptors: Iterable[Interceptor[Any, Any]] | None = None,
|
|
145
149
|
retry_max_attempts: int | None = None,
|
|
150
|
+
retry_mode: Literal["standard", "adaptive"] | None = None,
|
|
146
151
|
region: str | None = None,
|
|
147
152
|
use_dual_stack: bool | None = None,
|
|
148
153
|
use_fips: bool | None = None,
|
|
@@ -159,6 +164,8 @@ class CodeGuruProfilerClient:
|
|
|
159
164
|
self._client = client.wrap_with_middleware(lambda next: AuthMiddleware(next))
|
|
160
165
|
# One retry quota for all of this client's operations.
|
|
161
166
|
self._retry_quota = ThreadSafeRetryQuota()
|
|
167
|
+
# One send-rate limiter too, used when retry_mode is adaptive.
|
|
168
|
+
self._rate_limiter = ThreadSafeRateLimiter()
|
|
162
169
|
if credentials is not None and credentials_provider is not None:
|
|
163
170
|
warnings.warn(
|
|
164
171
|
"Both credentials and credentials_provider given; provider takes precedence"
|
|
@@ -176,6 +183,7 @@ class CodeGuruProfilerClient:
|
|
|
176
183
|
{
|
|
177
184
|
"operation_interceptors": operation_interceptors or [],
|
|
178
185
|
"retry_max_attempts": retry_max_attempts,
|
|
186
|
+
"retry_mode": retry_mode,
|
|
179
187
|
"region": region,
|
|
180
188
|
"use_dual_stack": use_dual_stack,
|
|
181
189
|
"use_fips": use_fips,
|
|
@@ -203,12 +211,15 @@ class CodeGuruProfilerClient:
|
|
|
203
211
|
if operation_logging is not None:
|
|
204
212
|
interceptors_.append(log_operation(operation_logging))
|
|
205
213
|
interceptors_.append(retry())
|
|
214
|
+
interceptors_.append(rate_limit())
|
|
206
215
|
options_: OperationOptions = OperationOptions(
|
|
207
216
|
client=self._client,
|
|
208
217
|
retry_quota=self._retry_quota,
|
|
218
|
+
rate_limiter=self._rate_limiter,
|
|
209
219
|
retry_max_attempts=overrides.get(
|
|
210
220
|
"retry_max_attempts", self._config.get("retry_max_attempts")
|
|
211
221
|
),
|
|
222
|
+
retry_mode=overrides.get("retry_mode", self._config.get("retry_mode")),
|
|
212
223
|
region=overrides.get("region", self._config.get("region")),
|
|
213
224
|
use_dual_stack=overrides.get(
|
|
214
225
|
"use_dual_stack", self._config.get("use_dual_stack")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: capo-codeguruprofiler
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.0
|
|
4
4
|
Summary: Typed, async Python SDK for AWS Codeguruprofiler.
|
|
5
5
|
Project-URL: Homepage, https://capo-sdk.dev/
|
|
6
6
|
Project-URL: Documentation, https://capo-sdk.dev/services/codeguruprofiler/
|
|
@@ -94,6 +94,8 @@ The SDK retries failed operations automatically. Retry behaviour follows the Smi
|
|
|
94
94
|
|
|
95
95
|
The number of attempts defaults to 3 and can be changed at the client level via `retry_max_attempts`, or per call via `config_overrides`.
|
|
96
96
|
|
|
97
|
+
`retry_mode="adaptive"` (or `AWS_RETRY_MODE=adaptive`, or `retry_mode = adaptive` in the AWS profile) also slows the whole client down once the service starts throttling it, then speeds back up as requests succeed. The default is `standard`.
|
|
98
|
+
|
|
97
99
|
```python
|
|
98
100
|
from capo_codeguruprofiler import AsyncCodeGuruProfilerClient
|
|
99
101
|
|
|
File without changes
|
|
File without changes
|
{capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/__init__.py
RENAMED
|
File without changes
|
{capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_async.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_aws.py
RENAMED
|
File without changes
|
{capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_body.py
RENAMED
|
File without changes
|
{capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/_iter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{capo_codeguruprofiler-0.13.0 → capo_codeguruprofiler-0.14.0}/src/capo_codeguruprofiler/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|