def gcp_stats():
def decorator(f):<EOL><INDENT>@wraps(f)<EOL>def decorated_function(*args, **kwargs):<EOL><INDENT>start_time = time.time()<EOL>result = f(*args, **kwargs)<EOL>end_time = time.time()<EOL>strkey = _build_key(f.__name__, args, kwargs)<EOL>_GCP_STATS.setdefault(strkey, []).append(end_time - start_time)<EOL>return result<EOL><DEDENT>return decorated_function<EOL><DEDENT>return decorator<EOL>
Collect stats

Specifically, time function calls
:returns: function response
:rtype: varies