pub struct ProfilingSession {
pub id: String,
pub name: String,
pub start_time: Instant,
pub duration: Option<Duration>,
pub events: Vec<PerformanceEvent>,
pub call_stacks: Vec<CallStack>,
pub memory_events: Vec<MemoryEvent>,
pub hw_counters: HardwareCounters,
pub metadata: HashMap<String, String>,
pub status: SessionStatus,
}Expand description
Profiling session for tracking execution
Fields§
§id: StringSession ID
name: StringSession name
start_time: InstantStart time
duration: Option<Duration>Duration (if completed)
events: Vec<PerformanceEvent>Performance events collected
call_stacks: Vec<CallStack>Function call stacks
memory_events: Vec<MemoryEvent>Memory allocation tracking
hw_counters: HardwareCountersHardware performance counters
metadata: HashMap<String, String>Session metadata
status: SessionStatusSession status
Implementations§
Source§impl ProfilingSession
impl ProfilingSession
pub fn function_calls(&self) -> &HashMap<String, FunctionCallData>
pub fn total_duration_ms(&self) -> f64
pub fn total_allocations(&self) -> usize
pub fn average_cpu_usage(&self) -> f64
pub fn peak_memory_usage(&self) -> f64
pub fn available_memory(&self) -> f64
Trait Implementations§
Source§impl Clone for ProfilingSession
impl Clone for ProfilingSession
Source§fn clone(&self) -> ProfilingSession
fn clone(&self) -> ProfilingSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProfilingSession
impl RefUnwindSafe for ProfilingSession
impl Send for ProfilingSession
impl Sync for ProfilingSession
impl Unpin for ProfilingSession
impl UnsafeUnpin for ProfilingSession
impl UnwindSafe for ProfilingSession
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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