pub struct LagMeter { /* private fields */ }Expand description
Shared latency record for one sequencer’s writer thread.
Written by the writer, read and drained by the daemon. Deliberately a
plain observation surface with no policy of its own: what a node does
about a breach (write a file, page someone, refuse traffic) is an
operator decision, the same reasoning that keeps
SequencerHandle::durability_failed an observation rather than an
action.
Implementations§
Source§impl LagMeter
impl LagMeter
Sourcepub fn new() -> Self
pub fn new() -> Self
A meter gated at DEFAULT_GATE.
Sourcepub fn set_gate(&self, gate: Duration)
pub fn set_gate(&self, gate: Duration)
Moves the gate. Live rather than construction-time so a gate can be tightened against a running node, and so a test can prove the check is capable of failing.
Sourcepub fn record(
&self,
seq: u64,
decision: Duration,
durable: Duration,
batch: usize,
)
pub fn record( &self, seq: u64, decision: Duration, durable: Duration, batch: usize, )
Records one accepted op.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LagMeter
impl RefUnwindSafe for LagMeter
impl Send for LagMeter
impl Sync for LagMeter
impl Unpin for LagMeter
impl UnsafeUnpin for LagMeter
impl UnwindSafe for LagMeter
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