MCPcopy Create free account
hub / github.com/google-research/language / profiled_function

Function profiled_function

language/realm/profile.py:34–41  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

32
33
34def profiled_function(fn):
35
36 @functools.wraps(fn)
37 def wrapped(*args, **kwargs):
38 with Timer(fn.__name__):
39 return fn(*args, **kwargs)
40
41 return wrapped
42
43
44class Timer(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…