MCPcopy Index your code
hub / github.com/python/cpython / bench_parallel

Function bench_parallel

Tools/ftscalingbench/ftscalingbench.py:305–312  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

303
304
305def bench_parallel(func):
306 t0 = time.perf_counter_ns()
307 for inq in in_queues:
308 inq.put(func)
309 for outq in out_queues:
310 outq.get()
311 t1 = time.perf_counter_ns()
312 return t1 - t0
313
314
315def benchmark(func):

Callers 2

benchmarkFunction · 0.85
mainFunction · 0.85

Calls 2

putMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…