def count_calls(fn):
    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        counter("%s_calls" % get_qualname(fn)).inc()
        return fn(*args, **kwargs)
    return wrapper
Decorator to track the number of times a function is called.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pyformance-0.3.2/pyformance/registry.py/count_calls