pub struct PassProfile {
pub name: String,
pub execution_count: usize,
pub total_time: Duration,
pub optimizations_applied: usize,
pub memory_allocated: usize,
}Expand description
Pass-level profiling information.
Fields§
§name: StringPass name
execution_count: usizeNumber of times executed
total_time: DurationTotal time spent
optimizations_applied: usizeNumber of optimizations applied
memory_allocated: usizeMemory allocated during pass
Implementations§
Source§impl PassProfile
impl PassProfile
Sourcepub fn record_execution(&mut self, duration: Duration, optimizations: usize)
pub fn record_execution(&mut self, duration: Duration, optimizations: usize)
Record an execution of this pass.
Sourcepub fn average_time(&self) -> Duration
pub fn average_time(&self) -> Duration
Get average time per execution.
Sourcepub fn optimizations_per_execution(&self) -> f64
pub fn optimizations_per_execution(&self) -> f64
Get optimizations per execution.
Trait Implementations§
Source§impl Clone for PassProfile
impl Clone for PassProfile
Source§fn clone(&self) -> PassProfile
fn clone(&self) -> PassProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PassProfile
impl RefUnwindSafe for PassProfile
impl Send for PassProfile
impl Sync for PassProfile
impl Unpin for PassProfile
impl UnwindSafe for PassProfile
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