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

Function time_it

python/tests/test_performance_regression.py:19–22  ·  view source on GitHub ↗

Context manager to measure execution time.

()

Source from the content-addressed store, hash-verified

17
18@contextmanager
19def time_it() -> float:
20 """Context manager to measure execution time."""
21 start = time.perf_counter()
22 yield lambda: time.perf_counter() - start
23
24
25class TestPerformanceRegression:

Calls

no outgoing calls

Tested by

no test coverage detected