pub struct Metrics { /* private fields */ }
Expand description

A collection of metrics used throughout the Gossipsub behaviour.

Implementations§

Register how many peers do we known are subscribed to this topic.

Registers the subscription to a topic if the configured limits allow it. Sets the registered number of peers in the mesh to 0.

Registers the unsubscription to a topic if the topic was previously allowed. Sets the registered number of peers in the mesh to 0.

Register the inclusion of peers in our mesh due to some reason.

Register the removal of peers in our mesh due to some reason.

Register the current number of peers in our mesh for this topic.

Register that an invalid message was received on a specific topic.

Register a score penalty.

Registers that a message was published on a specific topic.

Register sending a message over a topic.

Register that a message was received (and was not a duplicate).

Register that a message was received (could have been a duplicate).

Register a memcache miss.

Register sending an IWANT msg for this topic.

Observes a heartbeat duration.

Observe a score of a mesh peer.

Register a new peers connection based on its protocol.

Removes a peer from the counter based on its protocol when it disconnects.

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 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.