Index: leahi_dialin/dd/modules/balancing_chamber.py =================================================================== diff -u -rf1b8b4e9558e9cb95b994044f1d7d247c6c8be3f -r8ebb614a8c6e52b27d40ac5ef8b48aa22a4be73d --- leahi_dialin/dd/modules/balancing_chamber.py (.../balancing_chamber.py) (revision f1b8b4e9558e9cb95b994044f1d7d247c6c8be3f) +++ leahi_dialin/dd/modules/balancing_chamber.py (.../balancing_chamber.py) (revision 8ebb614a8c6e52b27d40ac5ef8b48aa22a4be73d) @@ -16,7 +16,7 @@ # Module imports from logging import Logger - +import time # Project imports from leahi_dialin.common.constants import NO_RESET from leahi_dialin.common.generic_defs import DataTypes @@ -59,8 +59,8 @@ self.bal_chamber_switch_only_state = 0 #: The Balancing Chamber's switch only state self.is_bal_chamber_switching_active = 0 #: Is Balancing Chamber Switching Active self.dd_bal_chamber_timestamp = 0 #: The timestamp of the last message + self.handler_execution_times = [] - @publish(["msg_id_dd_bal_chamber_data", "execution_state", "switching_state", "switching_frequency", @@ -75,6 +75,7 @@ @param message: published balancing chamber data message @return: None """ + start = time.perf_counter() msg_list = [] msg_list.append(('self.execution_state', DataTypes.U32)) msg_list.append(('self.switching_state', DataTypes.U32)) @@ -90,8 +91,8 @@ message = message) self.dd_bal_chamber_timestamp = timestamp + self.handler_execution_times.append(time.perf_counter() - start) - def cmd_balancing_chamber_broadcast_interval_override(self, ms: int, reset: int = NO_RESET) -> int: """ Constructs and sends the balancing chamber data broadcast interval override command