Skip to content

Commit

Permalink
chore: remove performance metrics stuff from top-level __init__
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekMaggio committed Apr 16, 2024
1 parent 6805fc9 commit 373cf54
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions api/src/opentrons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,10 @@
ROBOT_FIRMWARE_DIR,
)
from opentrons.util import logging_config
from opentrons_shared_data.robot.dev_types import RobotTypeEnum
from opentrons.config import get_performance_metrics_data_dir
from opentrons.config.feature_flags import enable_performance_metrics
from opentrons.protocols.types import ApiDeprecationError
from opentrons.protocols.api_support.types import APIVersion
from ._version import version

try:
from performance_metrics import RobotContextTracker as robot_context_tracker
except ImportError:
from opentrons_shared_data.performance.dev_types import StubbedTracker as robot_context_tracker

HERE = os.path.abspath(os.path.dirname(__file__))
__version__ = version
Expand Down Expand Up @@ -145,15 +138,6 @@ async def _create_thread_manager() -> ThreadManagedHardware:
return thread_manager


perf_metrics_dir: Path = get_performance_metrics_data_dir()
should_track: bool = enable_performance_metrics(
RobotTypeEnum.robot_literal_to_enum(robot_configs.load().model)
)

def get_singleton_tracker() -> robot_context_tracker:
return robot_context_tracker(perf_metrics_dir, should_track)


async def initialize() -> ThreadManagedHardware:
"""
Initialize the Opentrons hardware returning a hardware instance.
Expand Down

0 comments on commit 373cf54

Please sign in to comment.