pub struct CompilationProfiler { /* private fields */ }Expand description
A profiler that tracks compilation phases in real-time.
Use begin_phase /
end_phase to bracket each compilation
stage, then call finish to collect the
completed ProfileReport.
Implementations§
Source§impl CompilationProfiler
impl CompilationProfiler
Sourcepub fn begin_phase(&mut self, phase: impl Into<String>)
pub fn begin_phase(&mut self, phase: impl Into<String>)
Start timing a new phase.
If there is an active phase it is ended automatically before the new one begins.
Sourcepub fn set_input_complexity(&mut self, complexity: usize)
pub fn set_input_complexity(&mut self, complexity: usize)
Set input complexity on the report.
Sourcepub fn set_output_size(&mut self, size: usize)
pub fn set_output_size(&mut self, size: usize)
Set output graph size on the report.
Sourcepub fn finish(self) -> ProfileReport
pub fn finish(self) -> ProfileReport
Finish profiling and return the report.
Any open phase is ended automatically.
Sourcepub fn current_report(&self) -> &ProfileReport
pub fn current_report(&self) -> &ProfileReport
Get a reference to the current (in-progress) report.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompilationProfiler
impl RefUnwindSafe for CompilationProfiler
impl Send for CompilationProfiler
impl Sync for CompilationProfiler
impl Unpin for CompilationProfiler
impl UnsafeUnpin for CompilationProfiler
impl UnwindSafe for CompilationProfiler
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