pub struct SystemResourceMonitor { /* private fields */ }
Expand description
System resource monitor for async tasks
Implementations§
Source§impl SystemResourceMonitor
impl SystemResourceMonitor
Sourcepub fn initialize(&mut self) -> Result<(), Error>
pub fn initialize(&mut self) -> Result<(), Error>
Initialize monitoring with baseline measurements
Sourcepub fn start_task_monitoring(&mut self, task_id: TaskId)
pub fn start_task_monitoring(&mut self, task_id: TaskId)
Start monitoring a specific task
Sourcepub fn update_task_metrics(&mut self, task_id: TaskId)
pub fn update_task_metrics(&mut self, task_id: TaskId)
Update metrics for a running task
Sourcepub fn get_task_metrics(&self, task_id: TaskId) -> Option<&TaskSystemMetrics>
pub fn get_task_metrics(&self, task_id: TaskId) -> Option<&TaskSystemMetrics>
Get metrics for a specific task
Sourcepub fn get_all_metrics(&self) -> &HashMap<TaskId, TaskSystemMetrics>
pub fn get_all_metrics(&self) -> &HashMap<TaskId, TaskSystemMetrics>
Get all task metrics
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SystemResourceMonitor
impl RefUnwindSafe for SystemResourceMonitor
impl Send for SystemResourceMonitor
impl Sync for SystemResourceMonitor
impl Unpin for SystemResourceMonitor
impl UnwindSafe for SystemResourceMonitor
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> 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