@contextmanager
def timing(slug):
    timer = Timer()
    timer.start()
    yield
    timer.stop()
    timer.store(slug)
A context manager to recording how long some logic takes & sends it off to
dataset/ETHPy150Open frankwiles/django-app-metrics/app_metrics/utils.py/timing