pub struct BudgetConfig {
pub enabled: bool,
pub mode: BudgetMode,
pub budget_per_sec_cap: Option<f64>,
pub budget_per_sec_floor: Option<f64>,
pub budget_fraction: f64,
pub default_capacity_per_sec: f64,
pub early_flush_fill_ratio: f64,
pub early_flush_cooldown: Duration,
pub early_flush_max_queued_bytes: usize,
pub early_flush_idle: Duration,
pub admission_timeout: Duration,
}Expand description
Configuration for the media-ops budget controller.
Fields§
§enabled: boolMaster switch. Default true (Fjord-first).
mode: BudgetModeHow deadline flushes interact with an empty token bucket.
budget_per_sec_cap: Option<f64>Hard cap on durable ops/sec (None = no hard cap beyond capacity×fraction).
budget_per_sec_floor: Option<f64>Soft floor on effective budget when set (must be ≤ cap).
budget_fraction: f64Fraction of capacity used as soft budget target.
default_capacity_per_sec: f64Capacity when no probe/EWMA is available (S3 default path).
early_flush_fill_ratio: f64Token fill ratio above which early-flush (effective linger = 0) is allowed.
early_flush_cooldown: DurationSuppress consecutive early-flushes for this long after one fires.
early_flush_max_queued_bytes: usizeEarly-flush only when the mutable queue holds at most this many bytes.
Combined with Self::early_flush_idle: bulk continuous ingest should
not early-flush. 0 disables the byte gate (idle gate may still apply).
early_flush_idle: DurationEarly-flush only if no produce has been enqueued for at least this long
(true idle). Sustained produce keeps resetting the timer so bulk waits
full linger / flush. ZERO disables the idle gate.
admission_timeout: DurationMax wait for tokens under BudgetMode::BudgetPriority.
Implementations§
Trait Implementations§
Source§impl Clone for BudgetConfig
impl Clone for BudgetConfig
Source§fn clone(&self) -> BudgetConfig
fn clone(&self) -> BudgetConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more