#[non_exhaustive]pub struct Traffic {Show 14 fields
pub announces_started: u64,
pub announces_ended: u64,
pub announced_bytes: u64,
pub broadcasts_started: u64,
pub broadcasts_ended: u64,
pub subscriptions_started: u64,
pub subscriptions_ended: u64,
pub fetches: u64,
pub bytes: u64,
pub frames: u64,
pub groups: u64,
pub datagrams: u64,
pub inflated: u64,
pub stale: Content,
}Expand description
A cumulative traffic counter readout for one slice (a broadcast on a
(tier, role), or any sum of such slices).
Every counter is cumulative, so a rate is delta / delta_t and a live
count is started - ended. This is also the wire shape of one entry on a
published stats track (the moq-stats crate serializes maps of these).
Unknown fields from a newer publisher are ignored and missing fields from
an older one default to zero.
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.announces_started: u64Cumulative broadcast announce events on this slice.
announces_ended: u64Cumulative broadcast unannounce events on this slice.
announced_bytes: u64Cumulative announce-control bytes: the broadcast name length summed
over each announce and unannounce. Distinct from bytes (payload).
broadcasts_started: u64Per-(broadcast, session) subscription sentinel opens: the first active subscription a session holds on a broadcast.
broadcasts_ended: u64Sentinel closes: the session’s last subscription to the broadcast ended.
subscriptions_started: u64Cumulative track-level subscriptions opened.
subscriptions_ended: u64Cumulative track-level subscriptions closed.
fetches: u64Cumulative group fetches requested. Counted once per coalesced fetch
when the fetch is issued, so one that resolves to NotFound still counts.
Separate from subscriptions_started and the viewer refcount. Fetched payload still
flows into bytes/frames/groups.
bytes: u64Cumulative payload bytes.
frames: u64Cumulative frames delivered.
groups: u64Cumulative groups delivered.
datagrams: u64Cumulative datagrams of datagram tracks delivered. Disjoint from groups and
frames; their payload counts in bytes.
inflated: u64Cumulative bytes inflated from compressed groups for plain readers. Every plain
reader shares one inflated copy per group, so each byte counts once. bytes still counts
payload as stored or sent.
stale: ContentContent skipped because it fell behind a live join’s
Start::Live max. Disjoint from the top-level payload
counters: skipped content is never handed over. A steady rate here means
subscribers are consistently behind the live edge.
Implementations§
Source§impl Traffic
impl Traffic
Sourcepub fn active_broadcasts(&self) -> u64
pub fn active_broadcasts(&self) -> u64
Distinct sessions currently subscribed (viewers on the egress side).
Sourcepub fn active_subscriptions(&self) -> u64
pub fn active_subscriptions(&self) -> u64
Track subscriptions currently open.
Trait Implementations§
impl Copy for Traffic
Source§impl<'de> Deserialize<'de> for Traffic
impl<'de> Deserialize<'de> for Traffic
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>,
impl Eq for Traffic
impl StructuralPartialEq for Traffic
Auto Trait Implementations§
impl Freeze for Traffic
impl RefUnwindSafe for Traffic
impl Send for Traffic
impl Sync for Traffic
impl Unpin for Traffic
impl UnsafeUnpin for Traffic
impl UnwindSafe for Traffic
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.