MCPcopy Create free account
hub / github.com/covscript/covscript / test_recursion

Function test_recursion

tests/benchmark.py:56–65  ·  view source on GitHub ↗
(num_tests, depth)

Source from the content-addressed store, hash-verified

54
55
56def test_recursion(num_tests, depth):
57 total_ops = 0
58 for _ in range(num_tests):
59 counter = 0
60 start_time = runtime_time()
61 while runtime_time() - start_time < 1000:
62 recursive(depth)
63 counter += 1
64 total_ops += counter
65 return int(total_ops / num_tests)
66
67
68# ---------------------- Fiber Context Switching ----------------------

Callers 1

mainFunction · 0.85

Calls 3

rangeFunction · 0.85
runtime_timeFunction · 0.85
recursiveFunction · 0.85

Tested by

no test coverage detected