def hist_calls(fn):
@functools.wraps(fn)<EOL>def wrapper(*args, **kwargs):<EOL><INDENT>_histogram = histogram(<EOL>"<STR_LIT>" % pyformance.registry.get_qualname(fn))<EOL>rtn = fn(*args, **kwargs)<EOL>if type(rtn) in (int, float):<EOL><INDENT>_histogram.add(rtn)<EOL><DEDENT>return rtn<EOL><DEDENT>return wrapper<EOL>
Decorator to check the distribution of return values of a function.