pub enum Sample {
Count(usize),
Ratio(f64),
PerTag(usize),
}Expand description
How to sub-select from the (tag-filtered) golden cases. Parsed from --sample.
Variants§
Count(usize)
At most N cases total, spread evenly across the list in file order (--sample 8).
Ratio(f64)
A fraction 0 < f < 1 of the cases, spread evenly (ceil, at least 1) (--sample 0.2, --sample 20%).
PerTag(usize)
At most K cases per distinct tag — the smoke selector (--sample per-tag:1). Greedy in
file order: a case is kept iff one of its tags is still under the K quota, and keeping it
counts toward all its tags — so a multi-tag case covers several tags at once.
Implementations§
Trait Implementations§
impl Copy for Sample
impl StructuralPartialEq for Sample
Auto Trait Implementations§
impl Freeze for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnsafeUnpin for Sample
impl UnwindSafe for Sample
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more