pub struct ProfileReport {
pub entries: Vec<ProfileEntry>,
pub total_duration_ms: f64,
pub input_complexity: usize,
pub output_size: usize,
}Expand description
A complete profiling report for a compilation run.
Fields§
§entries: Vec<ProfileEntry>Individual phase entries in execution order
total_duration_ms: f64Total wall-clock duration in milliseconds
input_complexity: usizeExpression complexity (number of nodes in input)
output_size: usizeOutput graph size (number of nodes in compiled graph)
Implementations§
Source§impl ProfileReport
impl ProfileReport
Sourcepub fn add_entry(&mut self, entry: ProfileEntry)
pub fn add_entry(&mut self, entry: ProfileEntry)
Add an entry and accumulate its duration into the total.
Sourcepub fn slowest_phase(&self) -> Option<&ProfileEntry>
pub fn slowest_phase(&self) -> Option<&ProfileEntry>
Get the slowest phase by duration.
Sourcepub fn fastest_phase(&self) -> Option<&ProfileEntry>
pub fn fastest_phase(&self) -> Option<&ProfileEntry>
Get the fastest phase by duration.
Sourcepub fn phase_percentages(&self) -> Vec<(&str, f64)>
pub fn phase_percentages(&self) -> Vec<(&str, f64)>
Percentage of total time spent in each phase.
Returns an empty vector when total duration is effectively zero.
Sourcepub fn phase_count(&self) -> usize
pub fn phase_count(&self) -> usize
Number of phases recorded.
Sourcepub fn compilation_speed(&self) -> f64
pub fn compilation_speed(&self) -> f64
Compilation speed: output nodes per millisecond.
Trait Implementations§
Source§impl Clone for ProfileReport
impl Clone for ProfileReport
Source§fn clone(&self) -> ProfileReport
fn clone(&self) -> ProfileReport
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 moreSource§impl Debug for ProfileReport
impl Debug for ProfileReport
Source§impl Default for ProfileReport
impl Default for ProfileReport
Source§fn default() -> ProfileReport
fn default() -> ProfileReport
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProfileReport
impl<'de> Deserialize<'de> for ProfileReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProfileReport
impl RefUnwindSafe for ProfileReport
impl Send for ProfileReport
impl Sync for ProfileReport
impl Unpin for ProfileReport
impl UnsafeUnpin for ProfileReport
impl UnwindSafe for ProfileReport
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