pub struct ContinuousForecastEngine { /* private fields */ }Expand description
Continuous forecast engine — re-fits models as new data arrives.
Implementations§
Source§impl ContinuousForecastEngine
impl ContinuousForecastEngine
Sourcepub fn enable(&self, config: ContinuousForecastConfig) -> Result<()>
pub fn enable(&self, config: ContinuousForecastConfig) -> Result<()>
Enable continuous forecasting for a measurement.
Sourcepub fn is_enabled(&self, measurement: &str) -> bool
pub fn is_enabled(&self, measurement: &str) -> bool
Check if a measurement has continuous forecasting enabled.
Sourcepub fn process_point(
&self,
measurement: &str,
tags: &BTreeMap<String, String>,
fields: &BTreeMap<String, FieldValue>,
timestamp: i64,
) -> Option<ForecastUpdate>
pub fn process_point( &self, measurement: &str, tags: &BTreeMap<String, String>, fields: &BTreeMap<String, FieldValue>, timestamp: i64, ) -> Option<ForecastUpdate>
Process a new data point for a series.
Returns the update type if the model was updated.
Sourcepub fn predict(
&self,
measurement: &str,
tags: &BTreeMap<String, String>,
horizon: usize,
) -> Result<ForecastResult>
pub fn predict( &self, measurement: &str, tags: &BTreeMap<String, String>, horizon: usize, ) -> Result<ForecastResult>
Get a forecast for a series.
Sourcepub fn config_count(&self) -> usize
pub fn config_count(&self) -> usize
Number of configured measurements.
Sourcepub fn series_count(&self) -> usize
pub fn series_count(&self) -> usize
Number of tracked series.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ContinuousForecastEngine
impl !UnwindSafe for ContinuousForecastEngine
impl Freeze for ContinuousForecastEngine
impl Send for ContinuousForecastEngine
impl Sync for ContinuousForecastEngine
impl Unpin for ContinuousForecastEngine
impl UnsafeUnpin for ContinuousForecastEngine
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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