Struct console_api::PollStats
source · pub struct PollStats {
pub polls: u64,
pub first_poll: Option<Timestamp>,
pub last_poll_started: Option<Timestamp>,
pub last_poll_ended: Option<Timestamp>,
pub busy_time: Option<Duration>,
}
Expand description
Contains stats about objects that can be polled. Currently these can be:
- tasks that have been spawned
- async operations on resources that are performed within the context of a task
Fields§
§polls: u64
The total number of times this object has been polled.
first_poll: Option<Timestamp>
The timestamp of the first time this object was polled.
If this is None
, the object has not yet been polled.
Subtracting this timestamp from created_at
can be used to calculate the
time to first poll for this object, a measurement of executor latency.
last_poll_started: Option<Timestamp>
The timestamp of the most recent time this objects’s poll method was invoked.
If this is None
, the object has not yet been polled.
If the object has only been polled a single time, then this value may be
equal to the first_poll
timestamp.
last_poll_ended: Option<Timestamp>
The timestamp of the most recent time this objects’s poll method finished execution.
If this is None
, the object has not yet been polled or is currently being polled.
If the object does not exist anymore, then this is the time the final invocation of its poll method has completed.
busy_time: Option<Duration>
The total duration this object was being actively polled, summed across all polls.
Note that this includes only polls that have completed, and does not
reflect any in-progress polls. Subtracting busy_time
from the
total lifetime of the polled object results in the amount of time it
has spent waiting to be polled (including the scheduled_time
value
from TaskStats
, if this is a task).
Trait Implementations§
source§impl Message for PollStats
impl Message for PollStats
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<PollStats> for PollStats
impl PartialEq<PollStats> for PollStats
impl StructuralPartialEq for PollStats
Auto Trait Implementations§
impl RefUnwindSafe for PollStats
impl Send for PollStats
impl Sync for PollStats
impl Unpin for PollStats
impl UnwindSafe for PollStats
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