MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / benchmark_function

Function benchmark_function

python/examples/performance_demo.py:32–37  ·  view source on GitHub ↗

Benchmark a function and return execution time.

(func, *args, **kwargs)

Source from the content-addressed store, hash-verified

30
31
32def benchmark_function(func, *args, **kwargs):
33 """Benchmark a function and return execution time."""
34 start_time = time.perf_counter()
35 result = func(*args, **kwargs)
36 end_time = time.perf_counter()
37 return end_time - start_time, result
38
39
40def create_test_data(size):

Callers 5

benchmark_range_queriesFunction · 0.85
benchmark_iterationFunction · 0.85
benchmark_insertionFunction · 0.85
capacity_tuning_demoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected