core.benchmark¶
Classes¶
Module Contents¶
- class Benchmark¶
- compare()¶
Prints a comparison table of all stored results.
- measure(name: str, iterations: int = 10, warmup: int = 2)¶
A context manager or decorator to measure a block of code. Usage as Context Manager:
- with benchmark.measure(“My Test”, iterations=50):
do_something()
- results: Dict[str, BenchmarkResult]¶