Index: leahi_dialin/td/modules/switches.py =================================================================== diff -u -re45b20cdc5d4c5dcff8cef530b173ca94cb2e422 -r820c94585ab5d85c40395e828c4dfe2da164c105 --- leahi_dialin/td/modules/switches.py (.../switches.py) (revision e45b20cdc5d4c5dcff8cef530b173ca94cb2e422) +++ leahi_dialin/td/modules/switches.py (.../switches.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 @@ -52,6 +53,7 @@ # The Switches data in dictionary format self.td_switches_status = { td_enum_repository.TDSwitchNames.H9_FRONT_DOOR.name: td_enum_repository.TDSwitchStatus.CLOSED.value } + self.handler_execution_times = [] @publish(["msg_id_td_switches_data", "td_switches_status", "td_switches_timestamp"]) @@ -62,13 +64,15 @@ @param message: published switches data message @return: none """ + start = time.perf_counter() sensor_list =[] sensor_list.append((td_enum_repository.TDSwitchNames.H9_FRONT_DOOR.name, DataTypes.U32)) self.process_into_dict(dict_to_update = self.td_switches_status, decoder_list = sensor_list, message = message) self.td_switches_timestamp = timestamp + self.handler_execution_times.append(time.perf_counter() - start) def cmd_switches_data_broadcast_interval_override(self, ms: int, reset: int = NO_RESET) -> int: