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 a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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