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

Function main

tests/benchmark.py:209–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207
208# ---------------------- Benchmark Report ----------------------
209def main():
210 print("Python Performance Benchmark")
211 print("Measure Unit: Operations Per Second (OPS)\n")
212
213 print(f"Sequential Simple Execution: {test_sequential_exec(5)}")
214 print(f"Sequential Function Calling: {test_sequential_fcall(5)}")
215 print(f"Recursive Function Calling: {test_recursion(5, 10)}")
216 print(
217 f"Fiber Context Switching: {asyncio.run(test_context_switch_async(5, 5))}"
218 )
219 print(f"Complex Math Operations: {test_math_ops(5, 5)}")
220 print(f"String Concatenation: {test_string_ops(5, 5)}")
221 print(f"Random Array Access: {test_array_index(5, 100000)}")
222 print(f"Random Hash Access: {test_hash_index(5, 100000)}")
223 print(f"Array Quicksort: {test_quicksort(5, 10000)}")
224
225 print("\nBenchmark Finished\n")
226
227
228if __name__ == "__main__":

Callers 1

benchmark.pyFile · 0.70

Calls 11

printFunction · 0.85
test_sequential_execFunction · 0.85
test_sequential_fcallFunction · 0.85
test_recursionFunction · 0.85
test_math_opsFunction · 0.85
test_string_opsFunction · 0.85
test_array_indexFunction · 0.85
test_hash_indexFunction · 0.85
test_quicksortFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected