pub struct InFlight<G: Gauge = AtomicInt<u64>>(pub G);
Expand description

A metric providing an in-flight gauge, showing how many calls are currently active for an expression.

This is a light-weight metric.

This makes sense mostly in a multi-threaded situation where several threads may call the same method constantly, and we want to monitor how many are active at a given time.

The [Throughput] metric shows an alternative view of the same picture, by reporting how many transactions per seconds are processed by an expression.

By default, InFlight uses a lock-free u64 Gauge, which makes sense in multithread scenarios. Non-threaded applications can gain performance by using a std::cell:Cell<u64> instead.

Tuple Fields

0: G

Trait Implementations

Requests to clear self.

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

The resulting type after dereferencing.

Dereferences the value.

The type returned by the enter function and carried to OnResult

enter is called when entering in an aspect Read more

Called when an expression has exited, but the return value isn’t known. This can happen because of a panic, or if control flow bypasses a macro. This is also called by the default implementation of on_result. Read more

Called when an expression has returned. Read more

Serialize this value into the given Serde serializer. Read more

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.

Called when an expression has returned. Read more

Called when an expression has exited, but the return value isn’t known. This can happen because of a panic, or if control flow bypasses a macro. This is also called by the default implementation of on_result. Read more

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.