pub struct MeshRelayStats {Show 13 fields
pub forwarded: u64,
pub transmissions: u64,
pub queued: u64,
pub awaiting_transmission: usize,
pub duplicates_suppressed: u64,
pub covered_by_a_neighbor: u64,
pub peer_rate_limited: u64,
pub refused_queue_full: u64,
pub rate_deferred: u64,
pub abandoned_overdue: u64,
pub hop_limit_reached: u64,
pub reach_clamped: u64,
pub dropped_for_capacity: u64,
}Expand description
What this device has carried for other people.
A snapshot, safe to poll. Every field is cumulative since start-up except
Self::awaiting_transmission, which is a gauge: it is the queue depth
right now, and it goes down as well as up.
Fields§
§forwarded: u64Frames carried onward on someone else’s behalf, counted once each.
transmissions: u64Times this device put a frame on a link, counting each link separately and including hand-offs of its own messages.
This is what the per-second forwarding budget bounds, so it is the
number to compare against that ceiling — Self::forwarded is the
contribution figure to show a user.
queued: u64Frames accepted for forwarding.
awaiting_transmission: usizeFrames waiting to go out right now.
duplicates_suppressed: u64Arrivals ignored because the frame had already been handled.
covered_by_a_neighbor: u64Forwards dropped because every neighbor they could go to had already handed this device the same frame, the saving that keeps a crowded room from repeating itself.
peer_rate_limited: u64Frames refused because the neighbor sending them was over its share.
refused_queue_full: u64Frames refused admission, or refused room on their way back to the queue, because the pending queue was full.
This is a real loss: the frame reached nobody, and only a copy behind
it or the sender’s own retransmission will carry it now. A rising value
means forwards are arriving faster than this device can transmit them,
so the queue is the thing to raise, or the rate ceiling that is filling
it — see Self::rate_deferred.
rate_deferred: u64Transmissions held back because this device was at its forwarding rate.
A frame counted here is delayed, not dropped: it goes back on the queue and is tried again on the next tick, until it is either sent or has waited so long past its turn that carrying it no longer helps.
abandoned_overdue: u64Queued forwards given up on after waiting too long past their due time.
The other end of Self::rate_deferred: this is where a frame that
kept being delayed finally stops being carried. Deferral is free to
look healthy while this climbs, so it is the pair that says whether
back-pressure is costing anything.
hop_limit_reached: u64Frames that had travelled as far as they were allowed to.
reach_clamped: u64Frames whose claimed reach was cut down to local policy.
dropped_for_capacity: u64Ids forgotten for lack of room rather than age.
Expected to stay at zero. A non-zero value means this device is seeing more traffic than it can remember having handled, and a frame it forgets can be forwarded a second time.
Trait Implementations§
Source§impl Clone for MeshRelayStats
impl Clone for MeshRelayStats
Source§impl Debug for MeshRelayStats
impl Debug for MeshRelayStats
Source§impl Default for MeshRelayStats
impl Default for MeshRelayStats
impl Eq for MeshRelayStats
Source§impl PartialEq for MeshRelayStats
impl PartialEq for MeshRelayStats
impl StructuralPartialEq for MeshRelayStats
Auto Trait Implementations§
impl Freeze for MeshRelayStats
impl RefUnwindSafe for MeshRelayStats
impl Send for MeshRelayStats
impl Sync for MeshRelayStats
impl Unpin for MeshRelayStats
impl UnsafeUnpin for MeshRelayStats
impl UnwindSafe for MeshRelayStats
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);