MCPcopy
hub / github.com/openai/guided-diffusion / profile_kv

Function profile_kv

guided_diffusion/logger.py:294–300  ·  view source on GitHub ↗
(scopename)

Source from the content-addressed store, hash-verified

292
293@contextmanager
294def profile_kv(scopename):
295 logkey = "wait_" + scopename
296 tstart = time.time()
297 try:
298 yield
299 finally:
300 get_current().name2val[logkey] += time.time() - tstart
301
302
303def profile(n):

Callers 1

func_wrapperFunction · 0.85

Calls 1

get_currentFunction · 0.85

Tested by

no test coverage detected