pub enum ClockDriftStrategy {
None,
Monotonic,
Smooth,
}Expand description
Strategy for clock drift correction.
Variants§
None
No correction.
Monotonic
Enforce monotonically increasing timestamps — duplicate/backward stamps
are snapped to last_ts + 1ns.
Smooth
Detect gradual clock drift via regression on timestamp deltas and apply linear correction to align with the expected interval.
§Limitation
The smooth correction fits a linear regression on timestamp
deltas (delta[i] = a + b*i) and blends toward the ideal grid
proportionally to drift magnitude. This assumes clock drift is
approximately constant-rate (e.g. quartz oscillator frequency
offset). Non-linear drift patterns — such as thermal-induced
frequency ramps or GPS-disciplined clock step corrections — are
not well modelled and may leave residual jitter. For those cases
consider pre-processing with piecewise-linear or spline-based
correction before ingestion.
Trait Implementations§
Source§impl Clone for ClockDriftStrategy
impl Clone for ClockDriftStrategy
Source§fn clone(&self) -> ClockDriftStrategy
fn clone(&self) -> ClockDriftStrategy
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 ClockDriftStrategy
Source§impl Debug for ClockDriftStrategy
impl Debug for ClockDriftStrategy
Source§impl Default for ClockDriftStrategy
impl Default for ClockDriftStrategy
Source§fn default() -> ClockDriftStrategy
fn default() -> ClockDriftStrategy
Source§impl<'de> Deserialize<'de> for ClockDriftStrategy
impl<'de> Deserialize<'de> for ClockDriftStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ClockDriftStrategy
Source§impl PartialEq for ClockDriftStrategy
impl PartialEq for ClockDriftStrategy
Source§impl Serialize for ClockDriftStrategy
impl Serialize for ClockDriftStrategy
impl StructuralPartialEq for ClockDriftStrategy
Auto Trait Implementations§
impl Freeze for ClockDriftStrategy
impl RefUnwindSafe for ClockDriftStrategy
impl Send for ClockDriftStrategy
impl Sync for ClockDriftStrategy
impl Unpin for ClockDriftStrategy
impl UnsafeUnpin for ClockDriftStrategy
impl UnwindSafe for ClockDriftStrategy
Blanket Implementations§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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