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

Function test_sequential_exec

tests/benchmark.py:17–27  ·  view source on GitHub ↗

Benchmark simple sequential loop performance

(num_tests)

Source from the content-addressed store, hash-verified

15
16# ---------------------- Sequential Execution ----------------------
17def test_sequential_exec(num_tests):
18 """Benchmark simple sequential loop performance"""
19 total_ops = 0
20 for _ in range(num_tests):
21 counter = 0
22 start_time = runtime_time()
23 # Count how many iterations can be done within 1000 microseconds
24 while runtime_time() - start_time < 1000:
25 counter += 1
26 total_ops += counter
27 return int(total_ops / num_tests)
28
29
30# ---------------------- Function Call Performance ----------------------

Callers 1

mainFunction · 0.85

Calls 2

rangeFunction · 0.85
runtime_timeFunction · 0.85

Tested by

no test coverage detected