pub struct TacticProfileLog { /* private fields */ }Expand description
A log of tactic profiling events.
Implementations§
Source§impl TacticProfileLog
impl TacticProfileLog
Sourcepub fn record(&mut self, event: TacticProfilingEvent)
pub fn record(&mut self, event: TacticProfilingEvent)
Record an event.
Sourcepub fn total_duration_ns(&self) -> u64
pub fn total_duration_ns(&self) -> u64
Total duration of all tactic steps.
Sourcepub fn success_count(&self) -> usize
pub fn success_count(&self) -> usize
Number of successful tactic applications.
Sourcepub fn top_slow(&self, n: usize) -> Vec<&TacticProfilingEvent>
pub fn top_slow(&self, n: usize) -> Vec<&TacticProfilingEvent>
Top N slowest tactics by duration.
Sourcepub fn avg_duration_ns(&self) -> f64
pub fn avg_duration_ns(&self) -> f64
Average duration per tactic step.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TacticProfileLog
impl RefUnwindSafe for TacticProfileLog
impl Send for TacticProfileLog
impl Sync for TacticProfileLog
impl Unpin for TacticProfileLog
impl UnsafeUnpin for TacticProfileLog
impl UnwindSafe for TacticProfileLog
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