pub struct TaskProfileManager { /* private fields */ }Expand description
Manager for tracking multiple task profiles
Implementations§
Source§impl TaskProfileManager
impl TaskProfileManager
Sourcepub fn create_task(&self, task_name: String, task_type: TaskType) -> u64
pub fn create_task(&self, task_name: String, task_type: TaskType) -> u64
Create a new task profile
Sourcepub fn record_allocation(&self, task_id: u64, size: u64)
pub fn record_allocation(&self, task_id: u64, size: u64)
Record allocation for a task
Sourcepub fn record_deallocation(&self, task_id: u64, size: u64)
pub fn record_deallocation(&self, task_id: u64, size: u64)
Record deallocation for a task
Sourcepub fn complete_task(&self, task_id: u64)
pub fn complete_task(&self, task_id: u64)
Mark task as completed
Sourcepub fn get_profile(&self, task_id: u64) -> Option<TaskMemoryProfile>
pub fn get_profile(&self, task_id: u64) -> Option<TaskMemoryProfile>
Get profile for a specific task
Sourcepub fn get_all_profiles(&self) -> Vec<TaskMemoryProfile>
pub fn get_all_profiles(&self) -> Vec<TaskMemoryProfile>
Get all task profiles
Sourcepub fn get_profiles_by_type(
&self,
task_type: TaskType,
) -> Vec<TaskMemoryProfile>
pub fn get_profiles_by_type( &self, task_type: TaskType, ) -> Vec<TaskMemoryProfile>
Get profiles by task type
Sourcepub fn get_aggregated_stats(&self) -> AggregatedTaskStats
pub fn get_aggregated_stats(&self) -> AggregatedTaskStats
Get aggregated statistics
Sourcepub fn active_task_count(&self) -> usize
pub fn active_task_count(&self) -> usize
Get number of active tasks
Trait Implementations§
Source§impl Clone for TaskProfileManager
impl Clone for TaskProfileManager
Source§fn clone(&self) -> TaskProfileManager
fn clone(&self) -> TaskProfileManager
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 moreSource§impl Debug for TaskProfileManager
impl Debug for TaskProfileManager
Auto Trait Implementations§
impl Freeze for TaskProfileManager
impl RefUnwindSafe for TaskProfileManager
impl Send for TaskProfileManager
impl Sync for TaskProfileManager
impl Unpin for TaskProfileManager
impl UnsafeUnpin for TaskProfileManager
impl UnwindSafe for TaskProfileManager
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> 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