biogeme.profiling.benchmark module¶
- class biogeme.profiling.benchmark.BenchmarkCaseResult(label, first_call_time, second_call_time, repeated_call_times=<factory>)[source]¶
Bases:
object- Parameters:
label (str)
first_call_time (float)
second_call_time (float | None)
repeated_call_times (list[float])
- first_call_time: float¶
- label: str¶
- property mean_repeated_time: float | None¶
- repeated_call_times: list[float]¶
- second_call_time: float | None¶
- class biogeme.profiling.benchmark.BenchmarkSeriesResult(label, result, metadata=<factory>)[source]¶
Bases:
object- Parameters:
label (str)
result (BenchmarkCaseResult)
metadata (dict[str, Any])
- label: str¶
- metadata: dict[str, Any]¶
- result: BenchmarkCaseResult¶
- biogeme.profiling.benchmark.run_benchmark(label, function, *args, repeats=5, metadata=None, **kwargs)[source]¶
Run a simple benchmark with first-call, second-call, and repeated timings.
- Return type:
- Parameters:
label (str)
function (Callable[[...], Any])
args (Any)
repeats (int)
metadata (dict[str, Any] | None)
kwargs (Any)