From 5d0690a806da9f5b6e549c2e81192c16a4c1918a Mon Sep 17 00:00:00 2001 From: Favian Samatha Date: Wed, 7 Jan 2026 13:59:29 -0800 Subject: [PATCH] fix/benchmark-tests --- benchmarks/plugin_benchmarks.py | 12 +++++++----- benchmarks/plugin_manager_benchmarks.py | 8 +++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/benchmarks/plugin_benchmarks.py b/benchmarks/plugin_benchmarks.py index fb8a0c719..7106c35f4 100644 --- a/benchmarks/plugin_benchmarks.py +++ b/benchmarks/plugin_benchmarks.py @@ -30,6 +30,8 @@ from aws_advanced_python_wrapper.sql_alchemy_connection_provider import \ SqlAlchemyPooledConnectionProvider from aws_advanced_python_wrapper.utils.properties import Properties +from aws_advanced_python_wrapper.utils.telemetry.null_telemetry import \ + NullTelemetryFactory host_info = HostInfo(host="host", port=1234) @@ -83,7 +85,7 @@ def plugin_service_manager_container_mock(mocker, plugin_service_mock): @pytest.fixture def plugin_manager_with_execute_time_plugin(plugin_service_manager_container_mock, props_with_execute_time_plugin): - manager: PluginManager = PluginManager(plugin_service_manager_container_mock, props_with_execute_time_plugin) + manager: PluginManager = PluginManager(plugin_service_manager_container_mock, props_with_execute_time_plugin, NullTelemetryFactory()) return manager @@ -92,7 +94,7 @@ def plugin_manager_with_aurora_connection_tracker_plugin( plugin_service_manager_container_mock, props_with_aurora_connection_tracker_plugin): manager: PluginManager = PluginManager( - plugin_service_manager_container_mock, props_with_aurora_connection_tracker_plugin) + plugin_service_manager_container_mock, props_with_aurora_connection_tracker_plugin, NullTelemetryFactory()) return manager @@ -101,7 +103,7 @@ def plugin_manager_with_execute_time_and_aurora_connection_tracker_plugin( plugin_service_manager_container_mock, props_with_execute_time_and_aurora_connection_tracker_plugin): manager: PluginManager = PluginManager( - plugin_service_manager_container_mock, props_with_execute_time_and_aurora_connection_tracker_plugin) + plugin_service_manager_container_mock, props_with_execute_time_and_aurora_connection_tracker_plugin, NullTelemetryFactory()) return manager @@ -110,7 +112,7 @@ def plugin_manager_with_read_write_splitting_plugin( plugin_service_manager_container_mock, props_with_read_write_splitting_plugin): manager: PluginManager = PluginManager( - plugin_service_manager_container_mock, props_with_read_write_splitting_plugin) + plugin_service_manager_container_mock, props_with_read_write_splitting_plugin, NullTelemetryFactory()) return manager @@ -119,7 +121,7 @@ def plugin_manager_with_aurora_connection_tracker_and_read_write_splitting_plugi plugin_service_manager_container_mock, props_with_aurora_connection_tracker_and_read_write_splitting_plugin): manager: PluginManager = PluginManager( - plugin_service_manager_container_mock, props_with_aurora_connection_tracker_and_read_write_splitting_plugin) + plugin_service_manager_container_mock, props_with_aurora_connection_tracker_and_read_write_splitting_plugin, NullTelemetryFactory()) return manager diff --git a/benchmarks/plugin_manager_benchmarks.py b/benchmarks/plugin_manager_benchmarks.py index 0ed9ae3ad..fd7c562a4 100644 --- a/benchmarks/plugin_manager_benchmarks.py +++ b/benchmarks/plugin_manager_benchmarks.py @@ -28,6 +28,8 @@ from aws_advanced_python_wrapper.plugin_service import ( PluginManager, PluginServiceManagerContainer) from aws_advanced_python_wrapper.utils.properties import Properties +from aws_advanced_python_wrapper.utils.telemetry.null_telemetry import \ + NullTelemetryFactory from benchmarks.benchmark_plugin import BenchmarkPluginFactory host_info = HostInfo(host="host", port=1234) @@ -76,18 +78,18 @@ def plugin_service_manager_container_mock(mocker, plugin_service_mock): @pytest.fixture def plugin_manager_with_no_plugins(plugin_service_manager_container_mock, props_without_plugins): - manager = PluginManager(plugin_service_manager_container_mock, props_without_plugins) + manager = PluginManager(plugin_service_manager_container_mock, props_without_plugins, NullTelemetryFactory()) return manager @pytest.fixture def plugin_manager_with_plugins(plugin_service_manager_container_mock, props_with_plugins): - manager = PluginManager(plugin_service_manager_container_mock, props_with_plugins) + manager = PluginManager(plugin_service_manager_container_mock, props_with_plugins, NullTelemetryFactory()) return manager def init_plugin_manager(plugin_service_manager_container, props): - manager = PluginManager(plugin_service_manager_container, props) + manager = PluginManager(plugin_service_manager_container, props, NullTelemetryFactory()) return manager