

@contextlib.contextmanager
def time_logger(name, level=log.TRACE_LOG_LEVEL):
    start = time.time()
    (yield)
    logger.log(name, '%s took %dms', name, ((time.time() - start) * 1000))

dataset/ETHPy150Open mopidy/mopidy/mopidy/internal/timer.py time_logger/VarMisuse@37/42 `level`->`name`