pub struct RunCursor { /* private fields */ }Expand description
One CPU run of a sweep, built and stepped a slice at a time.
A run steps from tick 0 to the plan’s total, unless its stop condition holds at a sample first. The actions due at tick 0 fire before the first step, and those due at a later tick after the step that reaches it.
Implementations§
Source§impl RunCursor
impl RunCursor
Sourcepub fn new(
entry: &ModelEntry,
measure: &Arc<MeasurePlan>,
request: &RunRequest<'_>,
timeout: Option<Duration>,
) -> Self
pub fn new( entry: &ModelEntry, measure: &Arc<MeasurePlan>, request: &RunRequest<'_>, timeout: Option<Duration>, ) -> Self
Builds the model of request with the request’s seed, and times the build.
A run ends with the slice in which its stepping and sampling pass timeout. A cursor whose build failed
finishes on its first Self::advance, with the failure as its status. A GPU model is rejected.
Sourcepub fn advance(&mut self, max_steps: u64) -> CursorState
pub fn advance(&mut self, max_steps: u64) -> CursorState
Steps the run by at most max_steps steps, firing the actions and taking the samples due on the way.
A sample due at the tick the run has reached is taken even when max_steps is 0. A fault ends the run, and
its outcome keeps the samples taken before it.
§Panics
Panics when called again after it returned CursorState::Finished.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RunCursor
impl !Sync for RunCursor
impl !UnwindSafe for RunCursor
impl Freeze for RunCursor
impl Send for RunCursor
impl Unpin for RunCursor
impl UnsafeUnpin for RunCursor
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more