State and Runs¶
- class mew.State(*args, **kwargs)[source]¶
Bases:
ProtocolStructural state passed into benchmark targets.
Matched by the C++
_core.Stateand the_ProfileStateused for out-of-loop profile passes. Covers iteration, timing control, counters, labels, and range/thread accessors.
- class mew.BenchmarkFn(*args, **kwargs)[source]¶
Bases:
ProtocolA callable benchmark target.
Bound to Google Benchmark via the
@benchmark/@parametrize/@productdecorators. The first positional argument is aState; parametrized families bind additional kwargs at variant construction time.
- class mew.BenchmarkHandle¶
Bases:
objectHandle to a registered Google Benchmark. Methods return the same handle so options can be chained. Invalidated by the next clear_registered_benchmarks() call or interpreter shutdown; using a stale handle is undefined behaviour.
- arg(self, value: int) mew._core.BenchmarkHandle¶
- arg_name(self, name: str) mew._core.BenchmarkHandle¶
- dense_range(self, start: int, limit: int, step: int = 1) mew._core.BenchmarkHandle¶
- display_aggregates_only(self, value: bool = True) mew._core.BenchmarkHandle¶
- iterations(self, n: int) mew._core.BenchmarkHandle¶
- measure_process_cpu_time(self) mew._core.BenchmarkHandle¶
- min_time(self, seconds: float) mew._core.BenchmarkHandle¶
- min_warmup_time(self, seconds: float) mew._core.BenchmarkHandle¶
- property name¶
(self) -> str
- repetitions(self, n: int) mew._core.BenchmarkHandle¶
- report_aggregates_only(self, value: bool = True) mew._core.BenchmarkHandle¶
- unit(self, unit: Literal['ns', 'us', 'ms', 's']) BenchmarkHandle¶
- unit(self, unit: mew._core.TimeUnit) mew._core.BenchmarkHandle
- use_manual_time(self) mew._core.BenchmarkHandle¶
- use_real_time(self) mew._core.BenchmarkHandle¶
Run records¶
Results delivered to reporters are :class:Run objects (or
- class:
~mew._profile.EnrichedRunwhen a profiling pass has run):
- class mew.Run¶
Bases:
objectA single benchmark run report. Times are in seconds (accumulated across iterations); use adjusted_real_time() for per-iteration averages. Carries a __dict__ (dynamic_attr) so out-of-loop profile passes can attach .memory / .cpu to a row in place.
- property aggregate_name¶
(self) -> str
- property complexity_n¶
(self) -> int
- property counters¶
(self) -> dict
- property cpu_accumulated_time¶
(self) -> float
- property family_index¶
(self) -> int
- property iterations¶
(self) -> int
- property per_family_instance_index¶
(self) -> int
- property real_accumulated_time¶
(self) -> float
- property repetition_index¶
(self) -> int
- property repetitions¶
(self) -> int
- property report_label¶
(self) -> str
- property run_name¶
(self) -> mew._core.BenchmarkName
- property run_type¶
(self) -> mew._core.RunType
- property skip_message¶
(self) -> str
- property skipped¶
(self) -> bool
- property threads¶
(self) -> int
- property time_unit¶
(self) -> mew._core.TimeUnit