diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py index b95e5429371ee5b3b1ddad7458997e5ac1a0ce3c..6f93f982072752c3e4ac72704a7ced3ebc78b4d4 100644 --- a/atdb/taskdatabase/services/algorithms.py +++ b/atdb/taskdatabase/services/algorithms.py @@ -9,7 +9,7 @@ import base64 from datetime import datetime from django.db.models import Q, Sum import logging -from .common import timeit, get_summary_flavour, SummaryFlavour +from .common import get_summary_flavour, SummaryFlavour from django.urls import reverse from ..models import Task, LogEntry, Workflow, Configuration from django.conf import settings @@ -22,7 +22,6 @@ DJANGO_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" logger = logging.getLogger(__name__) -@timeit def get_size(status_list, type): """ aggregate the sizes of all task with a status in the list @@ -46,7 +45,6 @@ def get_size(status_list, type): return sum_value -@timeit def get_min_start_and_max_end_time(sas_id): """ Retrieve the minimum start time en maximum end time of a set of taskids (sas_id) diff --git a/atdb/taskdatabase/services/common.py b/atdb/taskdatabase/services/common.py index 0de7f32332a7afac48ab2b3e281daddb363b48ee..efba7f128473dda0c75831ee50819fa195e7c7ad 100644 --- a/atdb/taskdatabase/services/common.py +++ b/atdb/taskdatabase/services/common.py @@ -54,21 +54,6 @@ class AggregationStrategy(Enum): COLLECT_H5 = "collect_h5" -# this is a decorator that can be put in front (around) a function all to measure its execution time -def timeit(method): - def timed(*args, **kw): - ts = time.time() - result = method(*args, **kw) - te = time.time() - if 'log_time' in kw: - name = kw.get('log_name', method.__name__.upper()) - kw['log_time'][name] = int((te - ts) * 1000) - else: - print('execution time: %r %2.2f ms' % \ - (method.__name__, (te - ts) * 1000)) - return result - return timed - def get_summary_flavour(task): """ not every workflow has the same summary structure diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index 146d5ea8ce27e3cff83433d57d26dc76fc26df7a..1aa3b26ba6397429ba8b606b0607c82fb5107bc0 100644 --- a/atdb/taskdatabase/templates/taskdatabase/index.html +++ b/atdb/taskdatabase/templates/taskdatabase/index.html @@ -31,7 +31,7 @@ {% include 'taskdatabase/pagination.html' %} </div> </div> - <p class="footer"> Version 22 Jul 2024 + <p class="footer"> Version 23 Jul 2024 </div> {% include 'taskdatabase/refresh.html' %}