pub struct Gates {
pub global: Gate,
/* private fields */
}Expand description
The gate for every series, as tak.toml declares it.
Looked up by benchmark and tool, never by runner. A gate is a statement about a benchmark — how much of its count is the program’s own work — and that does not change with the machine it is measured on.
Fields§
§global: GateThe [gate] settings: what a series without its own gate is held to.
Implementations§
Source§impl Gates
impl Gates
Sourcepub fn uniform(global: Gate) -> Self
pub fn uniform(global: Gate) -> Self
The same gate for everything, as when there is no tak.toml.
pub fn set_bench(&mut self, bench: &str, gate: Gate)
pub fn set_series(&mut self, bench: &str, tool: &str, gate: Gate)
Sourcepub fn get(&self, bench: &str, tool: &str) -> Gate
pub fn get(&self, bench: &str, tool: &str) -> Gate
The gate for one series: its own, else its benchmark’s, else the global one.
A benchmark in the notes but no longer in tak.toml gets the global
gate rather than none. It is usually on the base side only, where
nothing gates it anyway; when it is on both, the project has not said
it is special, and the gate everything else gets is the honest default.
Sourcepub fn changes_from(
&self,
base: &Gates,
measured: &BTreeSet<(String, String)>,
) -> Vec<String>
pub fn changes_from( &self, base: &Gates, measured: &BTreeSet<(String, String)>, ) -> Vec<String>
What these gates hold differently from base, by effective value: the
global gate as [gate], then each series either side declares or
measured names whose resolved gate differs.
Effective rather than structural. Declaring a benchmark with no gate
adds it to the maps at the global gate, which is what an undeclared
series gets anyway; reporting that as a change would tell a pull
request that only added a benchmark its gate takes effect later. A
series that merely follows [gate] on both sides is covered by
[gate] and not named again.
Each entry is a code span, escaped by [code] like every other name in
the report: a benchmark name comes from the change under review, and one
holding a newline must not start a line of its own.