Configuration¶
mew resolves a [tool.mew] table from the nearest pyproject.toml, all keys are optional.
[tool.mew]
# Default paths for `mew run` / `mew list` when no positional args are given.
benchpaths = ["benchmarks"]
# Glob patterns for benchmark file discovery.
python_files = ["bench_*.py", "*_bench.py"]
[tool.mew.benchmark_options]
# Sticky Google Benchmark flags applied to every `mew run`.
# CLI-supplied flags appear later in argv and override these.
min_time = 0.5
repetitions = 5
Resolution order (last wins)¶
Defaults from
mew.config.Config.[tool.mew.benchmark_options]keys, formatted as--benchmark_<key>[=value].CLI flags:
--min-time,--repetitions,-o/--output.--benchmark-optionraw passthrough — for anythingmewdoesn’t model directly.
benchmark_options keys¶
The keys are the short Google Benchmark flag names, without the --benchmark_ prefix. Examples:
Key |
Effect |
|---|---|
|
|
|
|
|
|
|
|
|
Bool flag |
Picking sensible defaults¶
Set
min_time = 0.5(or higher) for CI runs where you want stable timings.Local iteration: leave it at Google Benchmark’s default for faster feedback.
Set
repetitions = 5if you compare withmew compare— variance metrics depend on it.