logo
pub struct QueryStats { /* private fields */ }
Expand description

Execution statistics of a query.

Implementations

Gets the total number of requests initiated by the query.

Gets the number of successful requests.

Gets the number of failed requests.

Gets the number of pending requests.

Note: A query can finish while still having pending requests, if the termination conditions are already met.

Gets the duration of the query.

If the query has not yet finished, the duration is measured from the start of the query to the current instant.

If the query did not yet start (i.e. yield the first peer to contact), None is returned.

Merges these stats with the given stats of another query, e.g. to accumulate statistics from a multi-phase query.

Counters are merged cumulatively while the instants for start and end of the queries are taken as the minimum and maximum, respectively.

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

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.

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.