pub struct DiscoveryStats {
pub total_candidates: usize,
pub connected: usize,
pub attempted: usize,
pub avg_score: f64,
pub total_discovered: u64,
pub total_connected: u64,
pub total_failed: u64,
pub method_distribution: HashMap<String, usize>,
}Expand description
Aggregated statistics snapshot returned by PeerDiscoveryManager::stats.
Fields§
§total_candidates: usizeTotal candidates currently tracked.
connected: usizeNumber of currently connected peers.
attempted: usizeNumber of candidates for which at least one attempt was made.
avg_score: f64Average connect_score across all tracked candidates.
total_discovered: u64Cumulative distinct peers ever added (including evicted ones).
total_connected: u64Cumulative peers that reached ConnectOutcome::Success.
total_failed: u64Cumulative failed connection attempts (Refused + Timeout + Unreachable).
method_distribution: HashMap<String, usize>How many candidates are tracked per discovery method (method name → count).
Trait Implementations§
Source§impl Clone for DiscoveryStats
impl Clone for DiscoveryStats
Source§fn clone(&self) -> DiscoveryStats
fn clone(&self) -> DiscoveryStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiscoveryStats
impl Debug for DiscoveryStats
Source§impl Default for DiscoveryStats
impl Default for DiscoveryStats
Source§fn default() -> DiscoveryStats
fn default() -> DiscoveryStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DiscoveryStats
impl RefUnwindSafe for DiscoveryStats
impl Send for DiscoveryStats
impl Sync for DiscoveryStats
impl Unpin for DiscoveryStats
impl UnsafeUnpin for DiscoveryStats
impl UnwindSafe for DiscoveryStats
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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 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>
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