pub struct ExecutionStats { /* private fields */ }Expand description
Statistics about task execution
Implementations§
Source§impl ExecutionStats
impl ExecutionStats
Sourcepub const fn active_tasks_mut(&mut self) -> &mut usize
pub const fn active_tasks_mut(&mut self) -> &mut usize
returns a mutable reference to the active tasks
Sourcepub const fn avg_execution_time_ms(&self) -> f32
pub const fn avg_execution_time_ms(&self) -> f32
return a copy of the average execution time in milliseconds
Sourcepub const fn avg_execution_time_ms_mut(&mut self) -> &mut f32
pub const fn avg_execution_time_ms_mut(&mut self) -> &mut f32
returns a mutable reference to the average execution time in milliseconds
Sourcepub const fn completed_tasks(&self) -> usize
pub const fn completed_tasks(&self) -> usize
return a copy of the completed tasks
Sourcepub const fn completed_tasks_mut(&mut self) -> &mut usize
pub const fn completed_tasks_mut(&mut self) -> &mut usize
returns a mutable reference to the completed tasks
Sourcepub const fn failed_tasks(&self) -> usize
pub const fn failed_tasks(&self) -> usize
return a copy of the failed tasks
Sourcepub const fn failed_tasks_mut(&mut self) -> &mut usize
pub const fn failed_tasks_mut(&mut self) -> &mut usize
returns a mutable reference to the failed tasks
Sourcepub const fn active_tasks(&self) -> usize
pub const fn active_tasks(&self) -> usize
return a copy of the active tasks
Sourcepub fn set_active_tasks(&mut self, active_tasks: usize) -> &mut Self
pub fn set_active_tasks(&mut self, active_tasks: usize) -> &mut Self
updates the current active tasks and returns a mutable reference to the current instance
Sourcepub fn set_avg_execution_time_ms(
&mut self,
avg_execution_time_ms: f32,
) -> &mut Self
pub fn set_avg_execution_time_ms( &mut self, avg_execution_time_ms: f32, ) -> &mut Self
updates the current average execution time in milliseconds and returns a mutable reference
Sourcepub fn set_completed_tasks(&mut self, completed_tasks: usize) -> &mut Self
pub fn set_completed_tasks(&mut self, completed_tasks: usize) -> &mut Self
updates the current completed tasks and returns a mutable reference to the current instance
Sourcepub fn set_failed_tasks(&mut self, failed_tasks: usize) -> &mut Self
pub fn set_failed_tasks(&mut self, failed_tasks: usize) -> &mut Self
updates the current failed tasks and returns a mutable reference to the current instance
Sourcepub fn with_active_tasks(self, active_tasks: usize) -> Self
pub fn with_active_tasks(self, active_tasks: usize) -> Self
consumes the current instance to create another with the given active tasks
Sourcepub fn with_avg_execution_time_ms(self, avg_execution_time_ms: f32) -> Self
pub fn with_avg_execution_time_ms(self, avg_execution_time_ms: f32) -> Self
consumes the current instance to create another with the given average execution time in milliseconds
Sourcepub fn with_completed_tasks(self, completed_tasks: usize) -> Self
pub fn with_completed_tasks(self, completed_tasks: usize) -> Self
consumes the current instance to create another with the given completed tasks
Sourcepub fn with_failed_tasks(self, failed_tasks: usize) -> Self
pub fn with_failed_tasks(self, failed_tasks: usize) -> Self
consumes the current instance to create another with the given failed tasks
Trait Implementations§
Source§impl Clone for ExecutionStats
impl Clone for ExecutionStats
Source§fn clone(&self) -> ExecutionStats
fn clone(&self) -> ExecutionStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionStats
impl Debug for ExecutionStats
Source§impl Default for ExecutionStats
impl Default for ExecutionStats
Source§fn default() -> ExecutionStats
fn default() -> ExecutionStats
Source§impl<'de> Deserialize<'de> for ExecutionStats
impl<'de> Deserialize<'de> for ExecutionStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ExecutionStats
impl PartialEq for ExecutionStats
Source§impl PartialOrd for ExecutionStats
impl PartialOrd for ExecutionStats
Source§impl Serialize for ExecutionStats
impl Serialize for ExecutionStats
impl Copy for ExecutionStats
impl StructuralPartialEq for ExecutionStats
Auto Trait Implementations§
impl Freeze for ExecutionStats
impl RefUnwindSafe for ExecutionStats
impl Send for ExecutionStats
impl Sync for ExecutionStats
impl Unpin for ExecutionStats
impl UnwindSafe for ExecutionStats
Blanket Implementations§
Source§impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
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>
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>
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