(num_tests, depth)
| 54 | |
| 55 | |
| 56 | def 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 ---------------------- |
no test coverage detected