Skip to main content

AdmissionStats

Struct AdmissionStats 

Source
pub struct AdmissionStats {
Show 21 fields pub admitted: u64, pub refused_at_capacity: u64, pub refused_per_principal: u64, pub refused_memory: u64, pub refused_anonymous: u64, pub refused_keyed_reserve: u64, pub refused_paused: u64, pub in_flight: u64, pub peak_in_flight: u64, pub limit: usize, pub reserved_bytes: u64, pub admitted_after_wait: u64, pub waited_ms_total: u64, pub peak_wait_ms: u64, pub refused_after_wait: u64, pub refused_lane: u64, pub overdrawn: u64, pub grown_bytes: u64, pub handoff_ms_total: u64, pub peak_handoff_ms: u64, pub unmeasured_sojourn: u64,
}
Expand description

A snapshot of the gate’s counters.

Taken atomically field by field rather than under a lock: these are a signal, and a signal that costs a mutex on the request path would be paid for by the thing it is measuring.

Fields§

§admitted: u64

Transfers let through since the server started.

§refused_at_capacity: u64

Transfers refused because the server-wide limit was full.

§refused_per_principal: u64

Transfers refused because one principal held its whole share.

§refused_memory: u64

Transfers refused because the memory budget was spoken for (gate 2).

§refused_anonymous: u64

Reads refused because the anonymous ceiling was full.

Deliberately not folded into refused_per_principal: that counter moving means a client gunnar knows about is being throttled, and this one moving means strangers are at their cap. A dashboard that added them together would show one number that can be entirely benign (a popular public repository, working exactly as designed) or entirely alarming (a keyed CI fleet starved of its share) with no way to tell which.

§refused_keyed_reserve: u64

Reads refused because the slot they wanted was inside the keyed reserve (D23b).

Deliberately not folded into refused_anonymous, which is the other half of the same door and means the opposite thing. refused_anonymous moving on an otherwise quiet box is normal — a popular public repository, the ceiling doing its job — and the operator response is none. This counter moving means the box was over CONTENTION_PERCENT full of real work at the moment a stranger asked, which is a capacity signal: it is the public door being shut by load, and it will keep being shut until either the load falls or the box grows. Summed together the two would show one number that means “everything is fine” and “your public repositories are effectively offline” with no way to tell which.

§refused_paused: u64

Transfers refused because the gate was paused (Pause): the data set was being grown. Its own counter, because this one moving is neither load nor strangers — it is a planned window, and an operator reading it wants to know how many clients met the window, not to raise any limit.

§in_flight: u64

Transfers in flight right now.

§peak_in_flight: u64

The most that were ever in flight at once. This is the number that says how close to the ceiling a server has actually been; in_flight alone never shows it, because a sampler always misses the peak.

§limit: usize

The governed server-wide limit right now, i.e. where the CoDel controller has moved to inside its band. 0 when there is no limit.

Without this the shed is invisible: an operator seeing refusals against a configured 100 has no way to know the governor has taken it to 37, which is the same “the limit exists but produces no signal” the unbounded listener was written about.

§reserved_bytes: u64

Bytes reserved by operations in flight, against memory_budget.

§admitted_after_wait: u64

Operations that were admitted only after waiting for a slot (DEFAULT_ADMISSION_WAIT).

This is the queue made countable. It is not a failure count: every one of these was served, and every one of them would have been a refusal before 2026-08-30.

§waited_ms_total: u64

Milliseconds spent waiting, summed over every operation that waited.

§peak_wait_ms: u64

The longest single admission wait, in milliseconds. The number that says whether the bound is doing anything.

§refused_after_wait: u64

Waits that ran out and became refusals.

§refused_lane: u64

Refusals because the operation’s lane was at its ceiling while the other lanes’ floors held the rest.

§overdrawn: u64

Transfers whose reservation grew past the memory budget while they ran. Nonzero means one transfer is now keeping new ones out — which is the budget working, not failing.

§grown_bytes: u64

Bytes charged by running transfers over and above their admission reservations.

§handoff_ms_total: u64

Milliseconds between admission and the transfer’s work actually starting, summed over every transfer that reported it.

Observed, not controlled. Until 2026-08-30 this gap was the CoDel controller’s input, and that was the defect: it is the tokio ready queue plus the blocking-pool handoff, which is set by how many clients are connected and doing crypto, not by how many transfers are admitted. A refused client reconnects, so shedding made this number worse and the controller shed until it hit its floor — the limit of 19 measured. It is kept as a counter because it is a real and useful symptom of a box that is out of CPU; it is no longer a control input.

§peak_handoff_ms: u64

The longest single admission-to-work gap, in milliseconds.

§unmeasured_sojourn: u64

Transfers that finished without ever reporting that their work started, so they contributed no sojourn sample.

A blindness counter, not a health one. The CoDel controller only sees what AdmissionGuard::entered_service files; a caller that forgets to call it leaves the controller with no samples at all, and a controller with no samples grows to the top of its band and stays there — a gate that looks like it is working and is not. This number must be 0 on any path that is actually governed.

Implementations§

Source§

impl AdmissionStats

Source

pub fn refused(&self) -> u64

Every refusal, however it was refused.

Source

pub fn mean_wait_ms(&self) -> u64

The mean admission wait over the operations that waited, in milliseconds. 0 when nothing has ever waited.

Trait Implementations§

Source§

impl Clone for AdmissionStats

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for AdmissionStats

Source§

impl Debug for AdmissionStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AdmissionStats

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for AdmissionStats

Source§

impl PartialEq for AdmissionStats

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for AdmissionStats

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more