Runner¶
- mew.run(entries=None, *, argv=None, reporter=None, filter=None, session_tag=None)[source]¶
Run benchmarks via the C++ Google Benchmark backend.
Each call is one session: a fresh time-ordered
session_idis stamped into the reporter context, so result files stay addressable when several runs land in one archive.- Parameters:
entries (
Sequence[Entry] |None) – Benchmarks to run.Noneruns everything in the global registry; pass a filtered subset (e.g. fromRegistry.filter()) to scope a run.argv (
Sequence[str] |None) – Argv forwarded to Google Benchmark’sInitialize. Defaults to["mew"].reporter (
Reporter|Iterable[Reporter] |None) – A single reporter, an iterable of reporters (multiplexed viaFanout), orNonefor Google Benchmark’s default console reporter.filter (
str|None) – Regex forwarded to Google Benchmark as--benchmark_filter=.session_tag (
str|None) – Human label for this session (e.g."before"), persisted next tosession_idin the reporter context.
- Return type:
- Returns:
int – Number of benchmarks Google Benchmark executed.
0if no entries were selected.
For lower-level entry points, see :mod:mew.runner:
Bridge between the Python registry and the C++ runner.