pub struct AdaptiveBatchConfig {
pub enabled: bool,
pub controller: String,
pub min: usize,
pub max: usize,
pub increase_step: usize,
pub decrease_factor: f64,
pub cooldown_batches: usize,
pub target_latency_ms: Option<u64>,
pub latency_window: usize,
pub error_threshold: f64,
pub respect_source_max: bool,
pub log_every: usize,
}Expand description
Configuration for the adaptive batch-size controller. Lives under
execution.adaptive_batch_size. Default enabled = false (opt-in); when
disabled the pipeline writes each page exactly as before.
Fields§
§enabled: boolMaster switch. Default false.
controller: StringController algorithm. Only "aimd" is implemented in v1.
min: usizeLower bound on the effective batch size.
max: usizeUpper bound. Under within-page reslicing the effective ceiling is
min(max, page_len); values above the source page size are inert.
increase_step: usizeAdditive growth per clean+fast batch.
decrease_factor: f64Multiplicative shrink factor on error / high latency (0 < f < 1).
cooldown_batches: usizeBatches to wait after a shrink before allowing growth.
target_latency_ms: Option<u64>Optional latency target in ms. None = react to errors only.
latency_window: usizeRolling window size for the p50 batch-write latency.
error_threshold: f64Per-batch error rate above which the controller shrinks.
respect_source_max: boolNever grow the effective batch past the source page size. Only true
is supported (the default) — false is rejected by validate, since
cross-page buffering would have to hold records across source pages and
break the pipeline’s O(batch_size) memory guarantee.
log_every: usizeEmit a tracing::info! summary every N adjustments.
Implementations§
Source§impl AdaptiveBatchConfig
impl AdaptiveBatchConfig
Sourcepub fn validate(&self) -> Result<(), FaucetError>
pub fn validate(&self) -> Result<(), FaucetError>
Fail-fast validation, surfaced as FaucetError::Config at config load.
Trait Implementations§
Source§impl Clone for AdaptiveBatchConfig
impl Clone for AdaptiveBatchConfig
Source§fn clone(&self) -> AdaptiveBatchConfig
fn clone(&self) -> AdaptiveBatchConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AdaptiveBatchConfig
impl Debug for AdaptiveBatchConfig
Source§impl<'de> Deserialize<'de> for AdaptiveBatchConfig
impl<'de> Deserialize<'de> for AdaptiveBatchConfig
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>,
Source§impl JsonSchema for AdaptiveBatchConfig
impl JsonSchema for AdaptiveBatchConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for AdaptiveBatchConfig
impl RefUnwindSafe for AdaptiveBatchConfig
impl Send for AdaptiveBatchConfig
impl Sync for AdaptiveBatchConfig
impl Unpin for AdaptiveBatchConfig
impl UnsafeUnpin for AdaptiveBatchConfig
impl UnwindSafe for AdaptiveBatchConfig
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
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request