pub struct ComprehensiveProfiler { /* private fields */ }Expand description
Comprehensive profiling session that combines multiple profiling techniques
Implementations§
Source§impl ComprehensiveProfiler
impl ComprehensiveProfiler
Sourcepub fn new(config: ComprehensiveConfig) -> ComprehensiveProfiler
pub fn new(config: ComprehensiveConfig) -> ComprehensiveProfiler
Create a new comprehensive profiler
Sourcepub fn start(&mut self) -> Result<(), SystemMonitorError>
pub fn start(&mut self) -> Result<(), SystemMonitorError>
Start comprehensive profiling
Sourcepub fn time_function<F, R>(&mut self, name: &str, f: F) -> Rwhere
F: FnOnce() -> R,
pub fn time_function<F, R>(&mut self, name: &str, f: F) -> Rwhere
F: FnOnce() -> R,
Time a function with comprehensive profiling
Sourcepub fn generate_report(&mut self) -> ComprehensiveReport
pub fn generate_report(&mut self) -> ComprehensiveReport
Generate comprehensive profiling report
Sourcepub fn export_report(&mut self, basepath: &str) -> Result<(), Error>
pub fn export_report(&mut self, basepath: &str) -> Result<(), Error>
Export comprehensive report to multiple formats
Sourcepub fn app_profiler(&self) -> Arc<Mutex<Profiler>>
pub fn app_profiler(&self) -> Arc<Mutex<Profiler>>
Get application profiler reference
Sourcepub fn get_current_system_metrics(
&self,
) -> Result<SystemMetrics, SystemMonitorError>
pub fn get_current_system_metrics( &self, ) -> Result<SystemMetrics, SystemMonitorError>
Get current system metrics
Sourcepub fn get_recent_alerts(&self, duration: Duration) -> Vec<SystemAlert>
pub fn get_recent_alerts(&self, duration: Duration) -> Vec<SystemAlert>
Get recent alerts
Trait Implementations§
Source§impl Drop for ComprehensiveProfiler
impl Drop for ComprehensiveProfiler
Auto Trait Implementations§
impl !RefUnwindSafe for ComprehensiveProfiler
impl !UnwindSafe for ComprehensiveProfiler
impl Freeze for ComprehensiveProfiler
impl Send for ComprehensiveProfiler
impl Sync for ComprehensiveProfiler
impl Unpin for ComprehensiveProfiler
impl UnsafeUnpin for ComprehensiveProfiler
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.