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 is
not reflecting any inprogress 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.
Trait Implementations
Returns the encoded length of the message without a length delimiter.
Encodes the message to a buffer. Read more
Encodes the message to a newly allocated buffer.
Encodes the message with a length-delimiter to a buffer. Read more
Encodes the message with a length-delimiter to a newly allocated buffer.
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
Decodes an instance of the message from a buffer, and merges it into self
. Read more
Decodes a length-delimited instance of the message from buffer, and
merges it into self
. Read more
Auto Trait Implementations
impl RefUnwindSafe for PollStats
impl UnwindSafe for PollStats
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more