pub struct SingleRingSnapshot {
pub cursor: u64,
pub gating: [u64; 4],
}Expand description
Minimal observability snapshot for SingleRing / sequenced-slots.
This is intentionally read-only and cheap to gather. It can be sampled without stopping the pipeline.
Fields§
§cursor: u64Current producer cursor.
gating: [u64; 4]Per-stage/consumer gating sequences (Layout4).
Implementations§
Source§impl SingleRingSnapshot
impl SingleRingSnapshot
Sourcepub fn min_gating(&self, active: usize) -> u64
pub fn min_gating(&self, active: usize) -> u64
Return the minimum gating sequence across the first active gating cells.
If active == 0, returns 0.
Sourcepub fn wrap_point(&self, window_capacity: u64) -> u64
pub fn wrap_point(&self, window_capacity: u64) -> u64
Compute the producer wrap point for the next claim/publish.
This corresponds to the producer’s internal check:
wrap_point = (next_seq) - window_capacity.
When wrap_point > min_gating(active), the producer is full.
Sourcepub fn wrap_pressure(&self, active: usize, window_capacity: u64) -> u64
pub fn wrap_pressure(&self, active: usize, window_capacity: u64) -> u64
Compute producer wrap pressure (saturating).
Returns wrap_point(window_capacity) - min_gating(active) (saturating).
0means the producer can still claim/publish without wrapping past min-gating.>0means the next claim would be blocked (Full).
Sourcepub fn outstanding(&self, active: usize) -> u64
pub fn outstanding(&self, active: usize) -> u64
Compute the number of in-flight sequences against the slowest (min) gating cell.
Trait Implementations§
Source§impl Clone for SingleRingSnapshot
impl Clone for SingleRingSnapshot
Source§fn clone(&self) -> SingleRingSnapshot
fn clone(&self) -> SingleRingSnapshot
Returns a duplicate of the value. Read more
1.0.0 · 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 SingleRingSnapshot
impl Debug for SingleRingSnapshot
Source§impl PartialEq for SingleRingSnapshot
impl PartialEq for SingleRingSnapshot
impl Copy for SingleRingSnapshot
impl Eq for SingleRingSnapshot
impl StructuralPartialEq for SingleRingSnapshot
Auto Trait Implementations§
impl Freeze for SingleRingSnapshot
impl RefUnwindSafe for SingleRingSnapshot
impl Send for SingleRingSnapshot
impl Sync for SingleRingSnapshot
impl Unpin for SingleRingSnapshot
impl UnwindSafe for SingleRingSnapshot
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
Mutably borrows from an owned value. Read more