Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions benchmarks/plugin_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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


Expand All @@ -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


Expand All @@ -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


Expand All @@ -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


Expand All @@ -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


Expand Down
8 changes: 5 additions & 3 deletions benchmarks/plugin_manager_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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


Expand Down