pub struct SearchStats {Show 22 fields
pub gen_time: Duration,
pub search_time: Duration,
pub lhs_count: usize,
pub rhs_count: usize,
pub lhs_tested: usize,
pub candidates_tested: usize,
pub candidate_window_total: usize,
pub candidate_window_max: usize,
pub candidate_window_max_lhs_postfix: Option<String>,
pub candidate_window_max_lhs_value: Option<f64>,
pub candidate_window_max_lhs_derivative: Option<f64>,
pub candidate_window_max_lhs_complexity: Option<u32>,
pub strict_gate_rejections: usize,
pub newton_calls: usize,
pub newton_success: usize,
pub pool_insertions: usize,
pub pool_rejections_error: usize,
pub pool_rejections_dedupe: usize,
pub pool_evictions: usize,
pub pool_final_size: usize,
pub pool_best_error: f64,
pub early_exit: bool,
}Expand description
Statistics collected during search
Fields§
§gen_time: DurationTime spent generating expressions
search_time: DurationTime spent searching/matching
lhs_count: usizeNumber of LHS expressions generated
rhs_count: usizeNumber of RHS expressions generated
lhs_tested: usizeNumber of LHS expressions tested (after filtering)
candidates_tested: usizeNumber of candidate pairs tested (coarse filter)
candidate_window_total: usizeTotal number of RHS expressions scanned across all candidate windows
candidate_window_max: usizeLargest RHS candidate window scanned for any single LHS
candidate_window_max_lhs_postfix: Option<String>Postfix form of the LHS that produced the largest candidate window
candidate_window_max_lhs_value: Option<f64>LHS value for the largest candidate window
candidate_window_max_lhs_derivative: Option<f64>LHS derivative for the largest candidate window
candidate_window_max_lhs_complexity: Option<u32>LHS complexity for the largest candidate window
strict_gate_rejections: usizeNumber of candidates rejected by the strict pre-Newton gate
newton_calls: usizeNumber of Newton-Raphson calls
newton_success: usizeNumber of successful Newton convergences
pool_insertions: usizeNumber of matches inserted into pool
pool_rejections_error: usizeNumber of matches rejected by pool (error threshold)
pool_rejections_dedupe: usizeNumber of matches rejected by pool (dedupe)
pool_evictions: usizeNumber of matches evicted from pool
pool_final_size: usizeFinal pool size
pool_best_error: f64Final best error in pool
early_exit: boolWhether search exited early
Implementations§
Source§impl SearchStats
impl SearchStats
pub fn new() -> Self
pub fn record_candidate_window(&mut self, lhs: &EvaluatedExpr, width: usize)
Sourcepub fn merge_search_counters(&mut self, other: &SearchStats)
pub fn merge_search_counters(&mut self, other: &SearchStats)
Merge another stats record’s additive search/pool counters into this one.
Generation-side counts and timing are owned by the caller and are not merged. The largest-candidate-window record keeps whichever side observed the wider window. Used to combine per-thread stats from the turbo matcher.
pub fn candidate_window_avg(&self) -> f64
pub fn candidates_per_pool_insertion(&self) -> f64
pub fn newton_success_rate(&self) -> f64
pub fn pool_attempts(&self) -> usize
pub fn pool_acceptance_rate(&self) -> f64
Trait Implementations§
Source§impl Clone for SearchStats
impl Clone for SearchStats
Source§fn clone(&self) -> SearchStats
fn clone(&self) -> SearchStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchStats
impl Debug for SearchStats
Source§impl Default for SearchStats
impl Default for SearchStats
Source§fn default() -> SearchStats
fn default() -> SearchStats
Auto Trait Implementations§
impl Freeze for SearchStats
impl RefUnwindSafe for SearchStats
impl Send for SearchStats
impl Sync for SearchStats
impl Unpin for SearchStats
impl UnsafeUnpin for SearchStats
impl UnwindSafe for SearchStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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