Skip to content

Commit

Permalink
Add perf debug logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxColoring committed Jan 18, 2022
1 parent 7044dea commit 9e1f889
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/src/opentrons/protocol_runner/legacy_context_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
from .thread_async_queue import ThreadAsyncQueue, QueueClosed


import logging
log = logging.getLogger(__name__)


class LegacyContextPlugin(AbstractPlugin):
"""A ProtocolEngine plugin wrapping a legacy ProtocolContext.
Expand Down Expand Up @@ -151,9 +155,11 @@ def _handle_legacy_command(self, command: LegacyCommand) -> None:
Used as a broker callback, so this will run in the APIv2 protocol's thread.
"""
log.debug("MAX: Handling legacy command.")
pe_actions = self._legacy_command_mapper.map_command(command=command)
for pe_action in pe_actions:
self._actions_to_dispatch.put(pe_action)
log.debug("MAX: Done handling legacy command.")

def _handle_labware_loaded(self, labware_load_info: LegacyLabwareLoadInfo) -> None:
"""Handle a labware load reported by the APIv2 protocol.
Expand Down Expand Up @@ -198,7 +204,9 @@ async def _dispatch_all_actions(self) -> None:
"""
while True:
try:
log.debug("MAX: Dispatching action in event loop.")
action = await self._actions_to_dispatch.get_async()
log.debug("MAX: Done dispatching action in event loop.")
except QueueClosed:
break
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
from opentrons.protocols.context.well import WellImplementation


import logging
log = logging.getLogger(__name__)


class InstrumentContextImplementation(AbstractInstrument):
"""Implementation of the InstrumentContext interface."""

Expand Down Expand Up @@ -102,9 +106,11 @@ def touch_tip(
version=self._api_version,
)
for edge in edges:
log.debug("MAX: About to do touch_tip movement.")
self._protocol_interface.get_hardware().hardware.move_to(
self._mount, edge, speed
)
log.debug("MAX: Done touch_tip movement.")

def pick_up_tip(
self,
Expand Down

0 comments on commit 9e1f889

Please sign in to comment.