Skip to main content

Plan

Struct Plan 

Source
pub struct Plan { /* private fields */ }
Expand description

A sweep spec checked against a model, with every config listed.

Runs are numbered config by config, so run run_id is replicate run_id % replicates of config run_id / replicates.

Implementations§

Source§

impl Plan

Source

pub fn model(&self) -> &str

Id of the model the plan runs.

Source

pub fn configs(&self) -> &[Config]

Every config, indexed by config id.

Source

pub fn config(&self, config_id: u64) -> Option<&Config>

Returns config config_id, or None past the last config.

Source

pub fn blocks(&self) -> &[PlannedBlock]

Every block, in spec order.

Source

pub fn run_settings(&self) -> &RunSettings

Length and end of each run, and the number of runs per config.

Source

pub fn measure_settings(&self) -> &MeasureSettings

Ticks each run samples, and the values it keeps from them.

Source

pub fn seed_settings(&self) -> SeedSettings

Root seed and the scheme that derives each run’s seed from it.

Source

pub fn actions(&self) -> &[ActionSpec]

Actions every run fires, in spec order, the order of Config::action_ticks.

Source

pub fn warnings(&self) -> &[PlanWarning]

Warnings about parts of the plan that run, though likely not as intended.

Source

pub fn replicates(&self) -> u64

Number of runs per config.

Source

pub fn run_count(&self) -> u64

Number of runs, every config times its replicates.

Source

pub fn run(&self, run_id: u64) -> Option<PlannedRun>

Returns run run_id, or None past the last run.

Source

pub fn runs(&self) -> impl Iterator<Item = PlannedRun> + '_

Returns every run in order.

Source

pub fn runs_in_shard( &self, shard: Shard, ) -> impl Iterator<Item = PlannedRun> + '_

Returns the runs of shard in order.

Source

pub fn schedule(&self, config: &Config) -> Schedule

Returns the actions of config in the order they fire, by tick and then in spec order.

§Panics

Panics when config does not hold one tick per action of the plan.

Source

pub fn replay(&self, run_id: u64) -> Option<Replay>

Returns the Replay of run run_id, or None past the last run.

Source

pub fn run_key(&self, run: &PlannedRun) -> u64

Returns the key that identifies the results of run, from run_key.

§Panics

Panics when the config of run is not in this plan.

Source

pub fn schema_hash(&self) -> u64

Hash of the model’s declarations, from schema_hash.

Source

pub fn results_fingerprint(&self) -> u64

Hash of every setting that shapes the results of one run, from results_fingerprint.

Source

pub fn plan_hash(&self) -> u64

Hash of every setting that fixes the configs and their seeds, from plan_hash.

Note that the replicate count and the timeout are left out.

Trait Implementations§

Source§

impl Clone for Plan

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Plan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Plan

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Plan

Auto Trait Implementations§

§

impl Freeze for Plan

§

impl RefUnwindSafe for Plan

§

impl Send for Plan

§

impl Sync for Plan

§

impl Unpin for Plan

§

impl UnsafeUnpin for Plan

§

impl UnwindSafe for Plan

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSync for T
where T: Sync,