SocketMetrics

Struct SocketMetrics 

Source
#[non_exhaustive]
pub struct SocketMetrics {
Show 35 fields pub update_direct_addrs: Counter, pub send_ipv4: Counter, pub send_ipv6: Counter, pub send_relay: Counter, pub recv_data_relay: Counter, pub recv_data_custom: Counter, pub recv_data_ipv4: Counter, pub recv_data_ipv6: Counter, pub recv_datagrams: Counter, pub recv_gro_datagrams: Counter, pub relay_home_change: Counter, pub relay_conns_success: Counter, pub relay_conns_failed: Counter, pub relay_conns_closed: Counter, pub relay_conns_ratelimited: Counter, pub holepunch_attempts: Counter, pub paths_direct: Counter, pub paths_relay: Counter, pub paths_custom: Counter, pub num_conns_direct: Counter, pub num_conns_opened: Counter, pub num_conns_closed: Counter, pub transport_ip_paths_added: Counter, pub transport_ip_paths_removed: Counter, pub transport_relay_paths_added: Counter, pub transport_relay_paths_removed: Counter, pub transport_custom_paths_added: Counter, pub transport_custom_paths_removed: Counter, pub actor_tick_main: Counter, pub actor_tick_msg: Counter, pub actor_tick_re_stun: Counter, pub actor_tick_portmap_changed: Counter, pub actor_tick_direct_addr_heartbeat: Counter, pub actor_link_change: Counter, pub actor_tick_other: Counter,
}
Expand description

Metrics collected by the iroh socket.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§update_direct_addrs: Counter

Intended to count updates to the local direct address set, but currently unused (never incremented).

§send_ipv4: Counter

Number of bytes sent over IPv4.

§send_ipv6: Counter

Number of bytes sent over IPv6.

§send_relay: Counter

Number of bytes sent over the relay transport.

§recv_data_relay: Counter

Number of data bytes received over the relay transport.

§recv_data_custom: Counter

Number of data bytes received over any custom transport.

§recv_data_ipv4: Counter

Number of data bytes received over IPv4.

§recv_data_ipv6: Counter

Number of data bytes received over IPv6.

§recv_datagrams: Counter

Number of QUIC datagrams received.

§recv_gro_datagrams: Counter

Number of receive events that used GRO (coalesced datagram batches).

This counts batches, not the individual datagrams within them. See Self::recv_datagrams for the datagram count.

§relay_home_change: Counter

Number of times the home relay changed to a different relay.

This includes the initial assignment from no home relay to a home relay.

§relay_conns_success: Counter

Number of connections to a relay server that were established.

Failed dial attempts are not counted. A relay that is reconnected to is counted once per connection, so this grows on every reconnect.

§relay_conns_failed: Counter

Number of failed attempts to connect to a relay server.

Each attempt is counted, so an unreachable relay increments this on every retry.

§relay_conns_closed: Counter

Number of connections to a relay server that ended.

Paired with Self::relay_conns_success, so the number of current connections is relay_conns_success - relay_conns_closed.

§relay_conns_ratelimited: Counter

Number of relay connections on which the relay reported rate limiting.

This is incremented at most once per connection, so it counts the affected connections and not how often the relay reported the problem. Relate it to Self::relay_conns_success to see how many connections were affected.

§holepunch_attempts: Counter

The number of times holepunching is initiated on a connection.

This can be incremented multiple times for a single connection. Note that only the client-side of a connection will increment this counter.

§paths_direct: Counter

The number of network paths to peers that are direct.

This can be incremented multiple times for a single connection.

§paths_relay: Counter

The number of network paths to peers that are relayed.

This would typically only be incremented once for a single connection.

§paths_custom: Counter

The number of network paths to peers that are user defined.

This would typically only be incremented once for a single connection.

§num_conns_direct: Counter

The number of connections that have been direct connections.

This is only incremented once for each opened connection. See num_conns_opened for the number of opened connections.

§num_conns_opened: Counter

Number of connections opened (only handshaked connections are counted).

§num_conns_closed: Counter

Number of connections closed (only handshaked connections are counted).

§transport_ip_paths_added: Counter

Number of IP transport paths opened.

§transport_ip_paths_removed: Counter

Number of IP transport paths closed.

§transport_relay_paths_added: Counter

Number of relay transport paths opened.

§transport_relay_paths_removed: Counter

Number of relay transport paths closed.

§transport_custom_paths_added: Counter

Number of custom transport paths opened.

§transport_custom_paths_removed: Counter

Number of custom transport paths closed.

§actor_tick_main: Counter

Number of iterations of the main socket actor loop.

§actor_tick_msg: Counter

Number of actor messages processed by the socket actor loop.

§actor_tick_re_stun: Counter

Number of periodic re-STUN timer ticks handled by the socket actor loop.

§actor_tick_portmap_changed: Counter

Number of port-mapping change events handled by the socket actor loop.

§actor_tick_direct_addr_heartbeat: Counter

Intended to count direct address heartbeat ticks, but currently unused (never incremented).

§actor_link_change: Counter

Number of local network interface (link) change events handled by the socket actor loop.

§actor_tick_other: Counter

Number of times an input watcher or receiver closed in the socket actor loop.

Trait Implementations§

Source§

impl Debug for Metrics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Metrics

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Metrics

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Iterable for Metrics

Source§

fn metric_field_count(&self) -> usize

Returns the number of metric fields in the struct.
Source§

fn metric_field_ref(&self, n: usize) -> Option<MetricItem<'_>>

Returns the metric field at the given index.
§

fn family_field_count(&self) -> usize

Returns the number of Family fields in the struct.
§

fn family_field_ref(&self, _n: usize) -> Option<FamilyItem<'_>>

Returns the Family field at the given index.
Source§

impl MetricsGroup for Metrics

Source§

fn name(&self) -> &'static str

Returns the name of this metrics group.
§

fn iter(&self) -> FieldIter<'_>

Returns an iterator over all metric items with their values and helps.
Source§

impl Serialize for Metrics

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoIterable for T
where T: Iterable,

§

fn as_iterable(&self) -> &dyn Iterable

Returns self as dyn Iterable
§

fn field_iter(&self) -> FieldIter<'_>

Returns an iterator over the metric fields of the struct.
§

fn family_iter(&self) -> FamilyIter<'_>

Returns an iterator over the Family fields of the struct.
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,