Index: leahi_dialin/td/modules/valves.py =================================================================== diff -u -r9c2fab5b413da62b218e6a9a12a5752e974071a0 -r820c94585ab5d85c40395e828c4dfe2da164c105 --- leahi_dialin/td/modules/valves.py (.../valves.py) (revision 9c2fab5b413da62b218e6a9a12a5752e974071a0) +++ leahi_dialin/td/modules/valves.py (.../valves.py) (revision 820c94585ab5d85c40395e828c4dfe2da164c105) @@ -16,6 +16,7 @@ # Module imports from logging import Logger +import time # Project imports from leahi_dialin.common.constants import NO_RESET @@ -55,6 +56,7 @@ # The Valves data in dictionary format self.valves_status = {td_enum_repository.TDValveNames.H1_VALV.name: {}, td_enum_repository.TDValveNames.H19_VALV.name: {}} + self.handler_execution_times = [] @publish(["msg_id_td_valves_data", "valves_status", "td_valves_timestamp"]) @@ -66,6 +68,7 @@ @param message: published TD valves data message @returns none """ + start = time.perf_counter() msg_list = [] msg_list.append(('Valve', DataTypes.U32)) msg_list.append(('State', DataTypes.U32)) @@ -90,6 +93,7 @@ # Update the valves dictionary self.valves_status[result['Valve']] = result self.td_valves_timestamp = timestamp + self.handler_execution_times.append(time.perf_counter() - start) def cmd_valves_broadcast_interval_override(self, ms: int, reset: int = NO_RESET) -> int: