pub struct RuleEngineProfiler { /* private fields */ }Expand description
Performance profiler for rule engine operations
Implementations§
Source§impl RuleEngineProfiler
impl RuleEngineProfiler
Sourcepub fn with_thresholds(thresholds: PerformanceThresholds) -> Self
pub fn with_thresholds(thresholds: PerformanceThresholds) -> Self
Create a new profiler with custom thresholds
Sourcepub fn start_operation(&mut self, operation_name: &str)
pub fn start_operation(&mut self, operation_name: &str)
Start timing an operation
Sourcepub fn end_operation(&mut self, operation_name: &str)
pub fn end_operation(&mut self, operation_name: &str)
End timing an operation
Sourcepub fn record_memory_snapshot(&mut self, label: &str)
pub fn record_memory_snapshot(&mut self, label: &str)
Record a memory snapshot
Sourcepub fn profile_operation<F, R>(
&mut self,
operation_name: &str,
operation: F,
) -> Rwhere
F: FnOnce() -> R,
pub fn profile_operation<F, R>(
&mut self,
operation_name: &str,
operation: F,
) -> Rwhere
F: FnOnce() -> R,
Profile a rule engine operation
Sourcepub fn generate_report(&self) -> PerformanceMetrics
pub fn generate_report(&self) -> PerformanceMetrics
Generate a comprehensive performance report
Sourcepub fn print_report(&self)
pub fn print_report(&self)
Generate a text report
Sourcepub fn export_json(&self) -> Result<String, Error>
pub fn export_json(&self) -> Result<String, Error>
Export metrics as JSON
Trait Implementations§
Source§impl Debug for RuleEngineProfiler
impl Debug for RuleEngineProfiler
Auto Trait Implementations§
impl Freeze for RuleEngineProfiler
impl RefUnwindSafe for RuleEngineProfiler
impl Send for RuleEngineProfiler
impl Sync for RuleEngineProfiler
impl Unpin for RuleEngineProfiler
impl UnsafeUnpin for RuleEngineProfiler
impl UnwindSafe for RuleEngineProfiler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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 more