pub struct ResidualSample {
pub t: f64,
pub class: ResidualClass,
pub value: f64,
pub channel: Option<String>,
}Expand description
A single residual sample. t is logical time (seconds since stream start).
value is the residual quantity in the class-specific natural units (the
units are documented per class in the paper’s Table 2).
Fields§
§t: f64§class: ResidualClass§value: f64The residual itself: actual − expected (or actual / expected for
cardinality, log-transformed). Never NaN; missing values are dropped
at the adapter boundary so downstream code can rely on this.
channel: Option<String>Optional channel discriminator (e.g. plan_hash, table id, wait_event name). Used by the motif grammar to scope episodes.
Implementations§
Source§impl ResidualSample
impl ResidualSample
pub fn new(t: f64, class: ResidualClass, value: f64) -> Self
pub fn with_channel(self, channel: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for ResidualSample
impl Clone for ResidualSample
Source§fn clone(&self) -> ResidualSample
fn clone(&self) -> ResidualSample
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResidualSample
impl Debug for ResidualSample
Source§impl<'de> Deserialize<'de> for ResidualSample
impl<'de> Deserialize<'de> for ResidualSample
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ResidualSample
impl RefUnwindSafe for ResidualSample
impl Send for ResidualSample
impl Sync for ResidualSample
impl Unpin for ResidualSample
impl UnsafeUnpin for ResidualSample
impl UnwindSafe for ResidualSample
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