pub struct GraphProfiler { /* private fields */ }Expand description
Performance profiler for computation graphs
Implementations§
Source§impl GraphProfiler
impl GraphProfiler
Sourcepub fn profile_execution<T, F>(&mut self, name: &str, func: F) -> Twhere
F: FnOnce() -> T,
pub fn profile_execution<T, F>(&mut self, name: &str, func: F) -> Twhere
F: FnOnce() -> T,
Profile the execution of a computation graph
Sourcepub fn get_stats(&self, name: &str) -> Option<ProfileStats>
pub fn get_stats(&self, name: &str) -> Option<ProfileStats>
Get profiling statistics
§Panics
Panics if the internal state is corrupted and the times vector is empty when it shouldn’t be (this should never happen in normal usage).
Sourcepub fn print_report(&self)
pub fn print_report(&self)
Print all profiling results
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphProfiler
impl RefUnwindSafe for GraphProfiler
impl Send for GraphProfiler
impl Sync for GraphProfiler
impl Unpin for GraphProfiler
impl UnsafeUnpin for GraphProfiler
impl UnwindSafe for GraphProfiler
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