pub struct ReaderStats {
pub bytes_received: AtomicU64,
pub credit_granted_total: AtomicU64,
pub read_ns: AtomicU64,
pub decode_ns: AtomicU64,
}Expand description
Diagnostic counters shared between a Reader and its FFI handle.
Held by the Reader via Arc so the FFI surface can clone it once
at handle-construction time and serve stat reads thereafter without
touching the UnsafeCell<Reader> that holds the Reader. That
decouples counter reads from the Reader’s borrow stack: a stat
getter no longer synthesises a &Reader while a laundered
&mut Reader (held by an in-flight ReaderQuery / Cursor) is
still on the stack — eliminating the aliasing question entirely.
All four counters are Relaxed — pure counters with no associated
happens-before requirement.
Fields§
§bytes_received: AtomicU64Total wire bytes (frame header + payload) read off the transport since this connection was opened.
credit_granted_total: AtomicU64Total bytes granted to the server via CREDIT (0x15) frames
since this connection was opened.
read_ns: AtomicU64Nanoseconds spent in transport.read_frame() since this
connection was opened. Saturates at u64::MAX.
decode_ns: AtomicU64Nanoseconds spent in decode_frame() since this connection
was opened. Saturates at u64::MAX.
Trait Implementations§
Source§impl Debug for ReaderStats
impl Debug for ReaderStats
Source§impl Default for ReaderStats
impl Default for ReaderStats
Source§fn default() -> ReaderStats
fn default() -> ReaderStats
Auto Trait Implementations§
impl !Freeze for ReaderStats
impl RefUnwindSafe for ReaderStats
impl Send for ReaderStats
impl Sync for ReaderStats
impl Unpin for ReaderStats
impl UnsafeUnpin for ReaderStats
impl UnwindSafe for ReaderStats
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> 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 more