diff --git a/View/acoustic_data_tab.py b/View/acoustic_data_tab.py index 0620ea6..dee1ce5 100644 --- a/View/acoustic_data_tab.py +++ b/View/acoustic_data_tab.py @@ -59,6 +59,7 @@ from Model.acoustic_data_loader import AcousticDataLoader from Model.acoustic_data_loader_UBSediFlow import AcousticDataLoaderUBSediFlow from Model.calibration_constant_kt import CalibrationConstantKt +from tools import trace locale.setlocale(locale.LC_ALL, '') @@ -733,6 +734,7 @@ class AcousticDataTab(QWidget): # -------------------- Functions for Acoustic dataTab -------------------- + @trace def full_update(self): logger.debug(f"{__name__}: Update") self.blockSignals(True) diff --git a/View/acoustic_inversion_tab.py b/View/acoustic_inversion_tab.py index b898c21..b2e0032 100644 --- a/View/acoustic_inversion_tab.py +++ b/View/acoustic_inversion_tab.py @@ -48,6 +48,7 @@ from View.checkable_combobox import CheckableComboBox import settings as stg from Model.acoustic_inversion_method_high_concentration import AcousticInversionMethodHighConcentration +from tools import trace _translate = QCoreApplication.translate @@ -371,6 +372,7 @@ class AcousticInversionTab(QWidget): # ------------------------------------ Functions for Acoustic Inversion Tab ---------------------------------------- # ================================================================================================================== + @trace def full_update(self): logger.debug(f"{__name__}: Update") self.blockSignals(True) diff --git a/View/note_tab.py b/View/note_tab.py index a5bf496..d8b7274 100644 --- a/View/note_tab.py +++ b/View/note_tab.py @@ -10,6 +10,8 @@ from PyQt5.QtCore import Qt import settings as stg +from tools import trace + logger = logging.getLogger("acoused") class NoteTab(QWidget): @@ -136,7 +138,7 @@ class NoteTab(QWidget): ## ---------- Functions ---------- ## ------------------------------- - + @trace def full_update(self): logger.debug(f"{__name__}: Update") self.blockSignals(True) diff --git a/View/sample_data_tab.py b/View/sample_data_tab.py index 8697557..9b97070 100644 --- a/View/sample_data_tab.py +++ b/View/sample_data_tab.py @@ -48,6 +48,8 @@ import Translation.constant_string as cs import settings as stg +from tools import trace + _translate = QCoreApplication.translate logger = logging.getLogger("acoused") @@ -271,6 +273,7 @@ class SampleDataTab(QWidget): self.groupbox_plot_PSD.setTitle(_translate("CONSTANT_STRING", cs.DISTRIBUTION_PLOT)) + @trace def full_update(self): logger.debug(f"{__name__}: Update") self.blockSignals(True) diff --git a/View/sediment_calibration_tab.py b/View/sediment_calibration_tab.py index 7d4c8ea..923e576 100644 --- a/View/sediment_calibration_tab.py +++ b/View/sediment_calibration_tab.py @@ -48,6 +48,8 @@ import settings as stg from View.checkable_combobox import CheckableComboBox from Model.acoustic_inversion_method_high_concentration import AcousticInversionMethodHighConcentration +from tools import trace + logger = logging.getLogger("acoused") class SedimentCalibrationTab(QWidget): @@ -857,6 +859,7 @@ class SedimentCalibrationTab(QWidget): # ----------------------------------- Functions for Signal processing Tab -------------------------------------- # ============================================================================================================== + @trace def full_update(self): logger.debug(f"{__name__}: Update") self.blockSignals(True) diff --git a/View/signal_processing_tab.py b/View/signal_processing_tab.py index 931fd15..a5cef86 100644 --- a/View/signal_processing_tab.py +++ b/View/signal_processing_tab.py @@ -511,6 +511,7 @@ class SignalProcessingTab(QWidget): self.icon_clear = QIcon(path_icon("clear.png")) self.icon_apply = QIcon(path_icon("circle_green_arrow_right.png")) + @trace def full_update(self): logger.debug(f"{__name__}: Update") self.blockSignals(True) diff --git a/tools.py b/tools.py index fe30842..7fe6e53 100644 --- a/tools.py +++ b/tools.py @@ -35,9 +35,10 @@ def trace(func): f"{head} Return {func.__module__}." + f"{func.__qualname__}: {value}" ) + dt = t1-t logger.debug( f"{head}[TIME] {func.__module__}." + - f"{func.__qualname__}: {t1-t} sec" + f"{func.__qualname__}: {dt:f} sec" ) return value