MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / check

Function check

20-executors/primes/proc_pool.py:21–24  ·  view source on GitHub ↗
(n: int)

Source from the content-addressed store, hash-verified

19 elapsed: float
20
21def check(n: int) -> PrimeResult:
22 t0 = perf_counter()
23 res = is_prime(n)
24 return PrimeResult(n, res, perf_counter() - t0)
25
26def main() -> None:
27 if len(sys.argv) < 2:

Callers 1

wrapperFunction · 0.50

Calls 2

is_primeFunction · 0.90
PrimeResultClass · 0.70

Tested by

no test coverage detected