(name, **kwargs)
return decorator
Wrap the OSprofiler trace_cls.

    Wrap the OSprofiler trace_cls decorator so that it will not try to
    patch the class unless OSprofiler is present.

    :param name: The name of action. For example, wsgi, rpc, db, ...
    :param kwargs: Any other keyword args used by profiler.trace_cls
Wrap the OSprofiler trace_cls.
Wrap the OSprofiler trace_cls .
def trace_cls(name, **kwargs):
    """Wrap the OSprofiler trace_cls.

    Wrap the OSprofiler trace_cls decorator so that it will not try to
    patch the class unless OSprofiler is present.

    :param name: The name of action. For example, wsgi, rpc, db, ...
    :param kwargs: Any other keyword args used by profiler.trace_cls
    """

    def decorator(cls):
        if profiler and 'profiler' in CONF:
            trace_decorator = profiler.trace_cls(name, kwargs)
            return trace_decorator(cls)
        return cls

    return decorator
def trace_cls ( name , * * kwargs ) : def decorator ( cls ) : if profiler and 'profiler' in CONF : trace_decorator = profiler . trace_cls ( name , kwargs ) return trace_decorator ( cls ) return cls return decorator