Skip to main content

buggify_knob

Macro buggify_knob 

Source
macro_rules! buggify_knob {
    ($default:expr, $range:expr) => { ... };
}
Expand description

Buggify a config knob value within bounds.

buggify_knob!(default, lo..hi) evaluates to default on most seeds, but when buggify is enabled and this call site is activated + fires (same model as buggify!) it evaluates to a random value in lo..hi. Deterministic per (location, seed), so replay is exact. Mirrors FoundationDB’s if (randomize && BUGGIFY) KNOB = random(lo, hi).