MCPcopy Index your code
hub / github.com/RustPython/RustPython / TimingWrapper

Class TimingWrapper

Lib/test/_test_multiprocessing.py:240–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238#
239
240class TimingWrapper(object):
241
242 def __init__(self, func):
243 self.func = func
244 self.elapsed = None
245
246 def __call__(self, *args, **kwds):
247 t = time.monotonic()
248 try:
249 return self.func(*args, **kwds)
250 finally:
251 self.elapsed = time.monotonic() - t
252
253#
254# Base class for test cases

Callers 9

_kill_processMethod · 0.85
test_putMethod · 0.85
test_getMethod · 0.85
test_timeoutMethod · 0.85
test_timeoutMethod · 0.85
test_eventMethod · 0.85
test_asyncMethod · 0.85
test_async_timeoutMethod · 0.85
test_connectionMethod · 0.85

Calls

no outgoing calls

Tested by 9

_kill_processMethod · 0.68
test_putMethod · 0.68
test_getMethod · 0.68
test_timeoutMethod · 0.68
test_timeoutMethod · 0.68
test_eventMethod · 0.68
test_asyncMethod · 0.68
test_async_timeoutMethod · 0.68
test_connectionMethod · 0.68