pub struct ClockObservation {
pub drift: Time,
pub peer_advances: u64,
pub refusals: u64,
pub max_peer_ahead: Time,
}Expand description
What an HlcClock has learned about clock skew in the cluster.
Every field is evidence measured on the data path. A record whose stamp pulls the local clock forward by 40 milliseconds is direct evidence of 40 milliseconds of skew between this node and the node that wrote the record. No probe and no extra round trip produce that number. The record already carried it.
This is a plain snapshot. The crate has no metrics dependency, and it must not gain one. An observability agent reads the snapshot and publishes it.
Fields§
§drift: TimeHow far the logical clock leads the physical clock right now.
This is l - pt: the logical wall time minus the physical wall time.
A positive value means that a peer, or this node’s own history, holds
the logical clock ahead of what the hardware reports, and that lead is
the skew this node carries. A negative value is normal, and it only
means that the physical clock moved on since the last event.
peer_advances: u64How many received stamps moved the local clock forward because the peer’s wall time was ahead of both the local logical clock and the local physical clock.
refusals: u64How many received stamps the self-fence refused.
A number above zero names a peer whose clock is broken, or a maximum offset set below the fleet’s real skew.
max_peer_ahead: TimeThe largest positive delta between a peer’s wall time and the local physical clock, over every stamp this clock received.
Refused stamps count here too, so the value shows the worst skew the node saw and not only the worst skew it absorbed. The value stays at zero while no peer is ahead.
Trait Implementations§
Source§impl Clone for ClockObservation
impl Clone for ClockObservation
Source§fn clone(&self) -> ClockObservation
fn clone(&self) -> ClockObservation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ClockObservation
Source§impl Debug for ClockObservation
impl Debug for ClockObservation
Source§impl PartialEq for ClockObservation
impl PartialEq for ClockObservation
Source§fn eq(&self, other: &ClockObservation) -> bool
fn eq(&self, other: &ClockObservation) -> bool
self and other values to be equal, and is used by ==.