Struct console_api::tasks::Stats
source · pub struct Stats {
pub created_at: Option<Timestamp>,
pub dropped_at: Option<Timestamp>,
pub wakes: u64,
pub waker_clones: u64,
pub waker_drops: u64,
pub last_wake: Option<Timestamp>,
pub poll_stats: Option<PollStats>,
pub self_wakes: u64,
pub scheduled_time: Option<Duration>,
}
Expand description
Task performance statistics.
Fields§
§created_at: Option<Timestamp>
Timestamp of when the task was spawned.
dropped_at: Option<Timestamp>
Timestamp of when the task was dropped.
wakes: u64
The total number of times this task has been woken over its lifetime.
waker_clones: u64
The total number of times this task’s waker has been cloned.
waker_drops: u64
The total number of times this task’s waker has been dropped.
last_wake: Option<Timestamp>
The timestamp of the most recent time this task has been woken.
If this is None
, the task has not yet been woken.
poll_stats: Option<PollStats>
Contains task poll statistics.
self_wakes: u64
The total number of times this task has woken itself.
scheduled_time: Option<Duration>
The total duration this task was scheduled prior to being polled, summed across all poll cycles.
Note that this includes only polls that have started, and does not
reflect any scheduled state where the task hasn’t yet been polled.
Subtracting both busy_time
(from the task’s PollStats
) and
scheduled_time
from the total lifetime of the task results in the
amount of time it spent unable to progress because it was waiting on
some resource.
Trait Implementations§
source§impl Message for Stats
impl Message for Stats
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self
.source§impl PartialEq<Stats> for Stats
impl PartialEq<Stats> for Stats
impl StructuralPartialEq for Stats
Auto Trait Implementations§
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnwindSafe for Stats
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request