diff --git a/tangostationcontrol/tangostationcontrol/devices/device_decorators.py b/tangostationcontrol/tangostationcontrol/devices/device_decorators.py index c4f48d8a4b6e1aa4b17b8624e1533b702e995464..f92409d720ab68e100a710962825a17f0d4855d0 100644 --- a/tangostationcontrol/tangostationcontrol/devices/device_decorators.py +++ b/tangostationcontrol/tangostationcontrol/devices/device_decorators.py @@ -80,8 +80,8 @@ def fault_on_error(): def TimeIt(log_function=None, max_history_len=10): """ - Wrapper to time calls, per object. Stores the timing log in a - <function>.statistics property as a dict with the following + Wrapper to time calls, per object ("self"). Stores the timing log in a + <function>.get_statistic(self) function returning a dict with the following information: "count": number of times the function was called @@ -128,9 +128,6 @@ def TimeIt(log_function=None, max_history_len=10): # return function result (if any) return result - # provide a way to access all collected statistics - timer_wrapper.statistics = statistics - # get the statistics for a specific object timer_wrapper.get_statistic = lambda self: statistics.get( self, default_statistic.copy()