pub struct Subject {
pub name: String,
pub cmd: Vec<String>,
pub prepare: Option<Vec<String>>,
pub dir: Option<PathBuf>,
pub env: BTreeMap<String, String>,
pub runs: Runs,
pub auto: AutoRuns,
pub warmup: u32,
pub counters: bool,
}Expand description
A subject with every default applied, ready to measure.
Fields§
§name: StringRecorded as Record::tool.
cmd: Vec<String>§prepare: Option<Vec<String>>§dir: Option<PathBuf>Relative to tak.toml; the caller resolves it.
env: BTreeMap<String, String>§runs: Runs§auto: AutoRunsThe limits Runs::Auto works within.
warmup: u32§counters: boolImplementations§
Source§impl Subject
impl Subject
Sourcepub fn anchor(&mut self, root: &Path)
pub fn anchor(&mut self, root: &Path)
Resolve paths against root, the directory holding tak.toml.
dir becomes the working directory, but a relative program path — one
containing a /, like ./target/release/mycli — is resolved against
root, not dir. Otherwise giving a subject a fixture directory would
make the project’s own binary unfindable. A bare name is left for PATH
lookup, and arguments are never touched.
Trait Implementations§
impl StructuralPartialEq for Subject
Auto Trait Implementations§
impl Freeze for Subject
impl RefUnwindSafe for Subject
impl Send for Subject
impl Sync for Subject
impl Unpin for Subject
impl UnsafeUnpin for Subject
impl UnwindSafe for Subject
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