

def __call__(self, func):
    'Decorator which returns the elapsed time of the function call.'
    if (not self.metric):
        self.metric = ('%s.%s' % (func.__module__, self.__name__))

    @wraps(func)
    def wrapped(*args, **kwargs):
        start = time()
        try:
            return func(*args, **kwargs)
        finally:
            self._send(start)
    return wrapped

dataset/ETHPy150Open DataDog/datadogpy/datadog/dogstatsd/base.py DogStatsd._TimedContextManagerDecorator.__call__/VarMisuse@36/64 `func`->`self`