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: u64Transfers let through since the server started.
refused_at_capacity: u64Transfers refused because the server-wide limit was full.
refused_per_principal: u64Transfers refused because one principal held its whole share.
refused_memory: u64Transfers refused because the memory budget was spoken for (gate 2).
refused_anonymous: u64Reads 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: u64Reads 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: u64Transfers 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: u64Transfers in flight right now.
peak_in_flight: u64The 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: usizeThe 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: u64Bytes reserved by operations in flight, against
memory_budget.
admitted_after_wait: u64Operations 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: u64Milliseconds spent waiting, summed over every operation that waited.
peak_wait_ms: u64The longest single admission wait, in milliseconds. The number that says whether the bound is doing anything.
refused_after_wait: u64Waits that ran out and became refusals.
refused_lane: u64Refusals because the operation’s lane was at its ceiling while the other lanes’ floors held the rest.
overdrawn: u64Transfers 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: u64Bytes charged by running transfers over and above their admission reservations.
handoff_ms_total: u64Milliseconds 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: u64The longest single admission-to-work gap, in milliseconds.
unmeasured_sojourn: u64Transfers 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§
Trait Implementations§
Source§impl Clone for AdmissionStats
impl Clone for AdmissionStats
impl Copy for AdmissionStats
Source§impl Debug for AdmissionStats
impl Debug for AdmissionStats
Source§impl Default for AdmissionStats
impl Default for AdmissionStats
impl Eq for AdmissionStats
Source§impl PartialEq for AdmissionStats
impl PartialEq for AdmissionStats
impl StructuralPartialEq for AdmissionStats
Auto Trait Implementations§
impl Freeze for AdmissionStats
impl RefUnwindSafe for AdmissionStats
impl Send for AdmissionStats
impl Sync for AdmissionStats
impl Unpin for AdmissionStats
impl UnsafeUnpin for AdmissionStats
impl UnwindSafe for AdmissionStats
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
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<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.