pub struct Config {
pub bench: BTreeMap<String, Bench>,
/* private fields */
}Fields§
§bench: BTreeMap<String, Bench>Benchmarks by name. A BTreeMap so runs are ordered and reproducible rather than following the file’s incidental key order.
Settings tables — [env], [gate], [report], [runner] — live in
the same file but are not deserialized here: the settings registry
declares their dotted keys, and settings::TakConfigLayer reads exactly
those, so this type never has to be kept in step with it. That is also
why defaults for every benchmark live under [defaults], not [env].
Implementations§
Source§impl Config
impl Config
Sourcepub fn group_names(&self) -> impl Iterator<Item = &str>
pub fn group_names(&self) -> impl Iterator<Item = &str>
The names of the declared [group.NAME] tables.
Sourcepub fn subjects(&self, name: &str) -> Result<Vec<Subject>>
pub fn subjects(&self, name: &str) -> Result<Vec<Subject>>
Every subject of benchmark name, with each layer applied: defaults,
the benchmark’s group, the benchmark, the shared subject, then the
benchmark’s own subject table. Templates are not rendered yet; see crate::template::render.
A single-command benchmark is one subject named SELF_TOOL with
counters on, which is exactly what it measured before subjects existed.
Source§impl Config
impl Config
Sourcepub fn gates(&self, global: Gate) -> Gates
pub fn gates(&self, global: Gate) -> Gates
The gate for every series this file declares, starting from global.
Stacked in the same order as every other setting — the benchmark, then
the shared [subject.NAME], then the benchmark’s own subject table —
key by key, so a subject that only sets enabled = false keeps the
benchmark’s percentage.
when is not consulted. It decides whether a series is measured, and a
series that was measured on either side is compared under the gate the
file gives it, whichever machine is reading the notes.