pub struct Metrics {
pub active_threads: usize,
pub input_channel_len: usize,
pub input_channel_capacity: Option<usize>,
pub output_channel_len: usize,
pub output_channel_capacity: Option<usize>,
pub execution_count: usize,
pub average_execution_duration_ns: usize,
}Expand description
Struct containing thread pool metrics, that is updated every approx. every 10 seconds.
Fields§
§active_threads: usizeCurrent number of running threads, which may temporarily differ from ThreadPool::get_pool_size.
input_channel_len: usize§input_channel_capacity: Option<usize>§output_channel_len: usize§output_channel_capacity: Option<usize>§execution_count: usizeTotal executions of the provided function since the last metrics update. Inputs that have been executed on, but not sent are not counted until they have sent;
average_execution_duration_ns: usizeAverage nano-second execution duration of the provided function since the last metrics update. Does not include any time the input/output spends in the channels.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)