Struct LifecycleStats

Source
pub struct LifecycleStats {
Show 20 fields pub completed_allocations: usize, pub average_lifetime_ms: f64, pub median_lifetime_ms: f64, pub lifetime_percentiles: LifecyclePercentiles, pub min_lifetime_ms: u128, pub max_lifetime_ms: u128, pub instant_allocations: usize, pub short_term_allocations: usize, pub medium_term_allocations: usize, pub long_term_allocations: usize, pub suspected_leaks: usize, pub memory_growth_events: usize, pub peak_concurrent_variables: usize, pub memory_efficiency_ratio: f64, pub ownership_transfer_events: usize, pub borrowing_violations: usize, pub fragmentation_score: f64, pub risk_distribution: RiskDistribution, pub scope_metrics: Vec<ScopeLifecycleMetrics>, pub type_lifecycle_patterns: Vec<TypeLifecyclePattern>,
}
Expand description

Enhanced lifecycle statistics for memory allocations per lifecycle.md specification

Fields§

§completed_allocations: usize

Number of completed allocations (with deallocation timestamps)

§average_lifetime_ms: f64

Average lifetime in milliseconds

§median_lifetime_ms: f64

Median lifetime in milliseconds

§lifetime_percentiles: LifecyclePercentiles

Lifecycle percentiles

§min_lifetime_ms: u128

Shortest lifetime in milliseconds

§max_lifetime_ms: u128

Longest lifetime in milliseconds

§instant_allocations: usize

Number of instant allocations (< 1ms)

§short_term_allocations: usize

Number of short-term allocations (1ms - 100ms)

§medium_term_allocations: usize

Number of medium-term allocations (100ms - 1s)

§long_term_allocations: usize

Number of long-term allocations (> 1s)

§suspected_leaks: usize

Number of suspected memory leaks (active > 10s)

§memory_growth_events: usize

Memory growth events (reallocations, expansions)

§peak_concurrent_variables: usize

Peak concurrent variables at any point in time

§memory_efficiency_ratio: f64

Memory efficiency ratio (useful_memory / total_allocated)

§ownership_transfer_events: usize

Ownership transfer events detected

§borrowing_violations: usize

Borrowing relationship violations

§fragmentation_score: f64

Memory fragmentation score (0.0 = perfect, 1.0 = highly fragmented)

§risk_distribution: RiskDistribution

Risk classification distribution

§scope_metrics: Vec<ScopeLifecycleMetrics>

Scope-based lifecycle metrics

§type_lifecycle_patterns: Vec<TypeLifecyclePattern>

Type-specific lifecycle patterns

Trait Implementations§

Source§

impl Clone for LifecycleStats

Source§

fn clone(&self) -> LifecycleStats

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LifecycleStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LifecycleStats

Source§

fn default() -> LifecycleStats

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for LifecycleStats

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for LifecycleStats

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,