Measurement
π€ AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
provide.testkit.time.measurement
¶
Time measurement fixtures for testing.
Fixtures for measuring execution time and benchmarking.
Classes¶
Functions¶
benchmark_timer
¶
Timer specifically for benchmarking code.
Returns:
| Type | Description |
|---|---|
BenchmarkTimer
|
Benchmark timer with statistics. |
Example
def test_with_benchmark(benchmark_timer): ... result, duration = benchmark_timer.measure(my_function, arg1, arg2) ... benchmark_timer.assert_faster_than(0.1) # Assert < 100ms