mcframework.benchmark.BenchmarkReport#
- class mcframework.benchmark.BenchmarkReport[source]#
Bases:
objectCollection of
BenchmarkResultrows plus run context.- Attributes:
- results
list[BenchmarkResult] All successfully measured cells.
- sizes
list[int] Simulation sizes that were attempted.
- system
dict Output of
system_info()captured at run time.
- results
Methods
Sorted unique sizes that actually produced a result.
Fastest result at size
n(default: the largest measured size).Group results by backend label, each list sorted by
n_simulations.Speedup factors relative to
baseline, as(n, factor)pairs.Render a fixed-width execution-time + speedup summary (
N/Afor gaps).JSON-serializable view (system info, sizes, and result rows).
- best(n: int | None = None) BenchmarkResult | None[source]#
Fastest result at size
n(default: the largest measured size).- Parameters:
- n
int, optional Size to inspect. Defaults to the largest size with any result.
- n
- Returns:
BenchmarkResultorNoneThe fastest cell at that size, or
Noneif there are no results.
- by_backend() dict[str, list[BenchmarkResult]][source]#
Group results by backend label, each list sorted by
n_simulations.
- speedups(baseline: str = 'sequential') dict[str, list[tuple[int, float]]][source]#
Speedup factors relative to
baseline, as(n, factor)pairs.
- classmethod __new__(*args, **kwargs)#