diff --git a/neutron_lib/db/resource_extend.py b/neutron_lib/db/resource_extend.py index 068cdaf37..f2ea2fc34 100644 --- a/neutron_lib/db/resource_extend.py +++ b/neutron_lib/db/resource_extend.py @@ -18,9 +18,15 @@ NOTE: This module shall not be used by external projects. It will be moved import collections import inspect +from oslo_log import log as logging +from oslo_utils import timeutils + from neutron_lib.utils import helpers +LOG = logging.getLogger(__name__) + + # This dictionary will store methods for extending API resources. # Extensions can add their own methods by invoking register_funcs(). _resource_extend_functions = { @@ -70,7 +76,7 @@ def get_funcs(resource): return _resource_extend_functions.get(resource, []) -@helpers.timecost +@timeutils.time_it(LOG, min_duration=0.1) def apply_funcs(resource_type, response, db_object): """Appy registered functions for the said resource type.