Index: leahi_dialin/td/modules/syringe_pump.py =================================================================== diff -u -r8ef0478470000c7e0de4dc05440521c955e18107 -r820c94585ab5d85c40395e828c4dfe2da164c105 --- leahi_dialin/td/modules/syringe_pump.py (.../syringe_pump.py) (revision 8ef0478470000c7e0de4dc05440521c955e18107) +++ leahi_dialin/td/modules/syringe_pump.py (.../syringe_pump.py) (revision 820c94585ab5d85c40395e828c4dfe2da164c105) @@ -15,6 +15,7 @@ ############################################################################ import struct from logging import Logger +import time from leahi_dialin.common.constants import RESET, NO_RESET from leahi_dialin.common.generic_defs import DataTypes @@ -62,6 +63,7 @@ self.syringe_pump_adc_dac_status = 0 #: current syringe pump ADC & DAC status self.syringe_pump_adc_read_counter = 0 #: current syringe pump ADC read counter self.td_syringe_pump_timestamp = 0.0 #: The timestamp of the syringe pump message + self.handler_execution_times = [] @publish(["td_syringe_pump_timestamp", @@ -80,6 +82,7 @@ @param message: published syringe pump data message @return: None """ + start = time.perf_counter() msg_list = [] msg_list.append(('self.syringe_pump_state', DataTypes.U32)) msg_list.append(('self.heparin_state', DataTypes.U32)) @@ -100,8 +103,8 @@ message = message) self.td_syringe_pump_timestamp = timestamp + self.handler_execution_times.append(time.perf_counter() - start) - def cmd_syringe_pump_operation(self, operation: int = SyringePumpOperations.SYRINGE_PUMP_OP_STOP.value, rate: float = 0.0, volume: float = 0.0) -> int: