aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/DataFeatures.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py
index 6711905..491d6ac 100644
--- a/src/argaze/DataFeatures.py
+++ b/src/argaze/DataFeatures.py
@@ -703,24 +703,21 @@ def PipelineStepExecutionTime(method):
end = time.perf_counter()
- # Create list to store method call dates
+ # Create list to store method call dates and init call frequency
if method.__name__ not in self._execution_times.keys():
self._execution_times[method.__name__] = []
+ self._execution_frequencies[method.__name__] = math.nan
# Store start end end dates
self._execution_times[method.__name__].append((start, end))
# Remove call dates older than 1 second and count number of calls to get frequency
- if self._execution_times[method.__name__][-1][0] - self._execution_times[method.__name__][0][0] > 1:
+ while self._execution_times[method.__name__][-1][0] - self._execution_times[method.__name__][0][0] > 1:
self._execution_times[method.__name__].pop(0)
self._execution_frequencies[method.__name__] = len(self._execution_times[method.__name__])
- else:
-
- self._execution_frequencies[method.__name__] = math.nan
-
return result
return wrapper