#[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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.update_direct_addrs: CounterIntended to count updates to the local direct address set, but currently unused (never incremented).
send_ipv4: CounterNumber of bytes sent over IPv4.
send_ipv6: CounterNumber of bytes sent over IPv6.
send_relay: CounterNumber of bytes sent over the relay transport.
recv_data_relay: CounterNumber of data bytes received over the relay transport.
recv_data_custom: CounterNumber of data bytes received over any custom transport.
recv_data_ipv4: CounterNumber of data bytes received over IPv4.
recv_data_ipv6: CounterNumber of data bytes received over IPv6.
recv_datagrams: CounterNumber of QUIC datagrams received.
recv_gro_datagrams: CounterNumber 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: CounterNumber 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: CounterNumber 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: CounterNumber 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: CounterNumber 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: CounterNumber 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: CounterThe 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: CounterThe number of network paths to peers that are direct.
This can be incremented multiple times for a single connection.
paths_relay: CounterThe number of network paths to peers that are relayed.
This would typically only be incremented once for a single connection.
paths_custom: CounterThe number of network paths to peers that are user defined.
This would typically only be incremented once for a single connection.
num_conns_direct: CounterThe 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: CounterNumber of connections opened (only handshaked connections are counted).
num_conns_closed: CounterNumber of connections closed (only handshaked connections are counted).
transport_ip_paths_added: CounterNumber of IP transport paths opened.
transport_ip_paths_removed: CounterNumber of IP transport paths closed.
transport_relay_paths_added: CounterNumber of relay transport paths opened.
transport_relay_paths_removed: CounterNumber of relay transport paths closed.
transport_custom_paths_added: CounterNumber of custom transport paths opened.
transport_custom_paths_removed: CounterNumber of custom transport paths closed.
actor_tick_main: CounterNumber of iterations of the main socket actor loop.
actor_tick_msg: CounterNumber of actor messages processed by the socket actor loop.
actor_tick_re_stun: CounterNumber of periodic re-STUN timer ticks handled by the socket actor loop.
actor_tick_portmap_changed: CounterNumber of port-mapping change events handled by the socket actor loop.
actor_tick_direct_addr_heartbeat: CounterIntended to count direct address heartbeat ticks, but currently unused (never incremented).
actor_link_change: CounterNumber of local network interface (link) change events handled by the socket actor loop.
actor_tick_other: CounterNumber of times an input watcher or receiver closed in the socket actor loop.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metrics
impl<'de> Deserialize<'de> for Metrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Iterable for Metrics
impl Iterable for Metrics
Source§fn metric_field_count(&self) -> usize
fn metric_field_count(&self) -> usize
Source§fn metric_field_ref(&self, n: usize) -> Option<MetricItem<'_>>
fn metric_field_ref(&self, n: usize) -> Option<MetricItem<'_>>
§fn family_field_count(&self) -> usize
fn family_field_count(&self) -> usize
Family fields in the struct.§fn family_field_ref(&self, _n: usize) -> Option<FamilyItem<'_>>
fn family_field_ref(&self, _n: usize) -> Option<FamilyItem<'_>>
Family field at the given index.Auto Trait Implementations§
impl !Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 Twhere
T: Iterable,
impl<T> IntoIterable for Twhere
T: Iterable,
§fn as_iterable(&self) -> &dyn Iterable
fn as_iterable(&self) -> &dyn Iterable
self as dyn Iterable