@decorator
def x_runtime(f, *args, **kwargs):

    _t0 = now()
    r = f(*args, **kwargs)
    _t1 = now()
    r.headers['X-Runtime'] = '{0}s'.format(Decimal(str(_t1 - _t0)))

    return r
X-Runtime Flask Response Decorator.
dataset/ETHPy150Open mozillazg/bustard/tests/httpbin/filters.py/x_runtime