pub struct PhaseStats {
pub phase_index: usize,
pub phase_type: &'static str,
pub step_count: u64,
pub moves_generated: u64,
pub moves_evaluated: u64,
pub moves_accepted: u64,
pub score_calculations: u64,
/* private fields */
}Fields§
§phase_index: usize§phase_type: &'static str§step_count: u64§moves_generated: u64§moves_evaluated: u64§moves_accepted: u64§score_calculations: u64Implementations§
Source§impl PhaseStats
impl PhaseStats
pub fn elapsed(&self) -> Duration
Sourcepub fn record_step(&mut self)
pub fn record_step(&mut self)
Records a step completion.
Sourcepub fn record_generated_batch(&mut self, count: u64, duration: Duration)
pub fn record_generated_batch(&mut self, count: u64, duration: Duration)
Records one or more generated candidate moves and the time spent generating them.
Sourcepub fn record_generation_time(&mut self, duration: Duration)
pub fn record_generation_time(&mut self, duration: Duration)
Records generation time that did not itself yield a counted move.
Sourcepub fn record_generated_move(&mut self, duration: Duration)
pub fn record_generated_move(&mut self, duration: Duration)
Records a single generated candidate move and the time spent generating it.
Sourcepub fn record_evaluated_move(&mut self, duration: Duration)
pub fn record_evaluated_move(&mut self, duration: Duration)
Records a move evaluation and the time spent evaluating it.
Sourcepub fn record_move_accepted(&mut self)
pub fn record_move_accepted(&mut self)
Records an accepted move.
Sourcepub fn record_score_calculation(&mut self)
pub fn record_score_calculation(&mut self)
Records a score calculation.
pub fn generated_throughput(&self) -> Throughput
pub fn evaluated_throughput(&self) -> Throughput
pub fn acceptance_rate(&self) -> f64
pub fn generation_time(&self) -> Duration
pub fn evaluation_time(&self) -> Duration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PhaseStats
impl RefUnwindSafe for PhaseStats
impl Send for PhaseStats
impl Sync for PhaseStats
impl Unpin for PhaseStats
impl UnsafeUnpin for PhaseStats
impl UnwindSafe for PhaseStats
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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