pub struct TuningConfig {Show 14 fields
pub profile: Option<TuningProfile>,
pub batch_size: Option<usize>,
pub batch_size_memory_mb: Option<usize>,
pub throttle_ms: Option<u64>,
pub statement_timeout_s: Option<u64>,
pub max_retries: Option<u32>,
pub retry_backoff_ms: Option<u64>,
pub lock_timeout_s: Option<u64>,
pub memory_threshold_mb: Option<usize>,
pub max_batch_memory_mb: Option<usize>,
pub on_batch_memory_exceeded: Option<BatchMemoryPolicy>,
pub adaptive: Option<bool>,
pub min_parallel: Option<usize>,
pub max_value_mb: Option<usize>,
}Fields§
§profile: Option<TuningProfile>§batch_size: Option<usize>§batch_size_memory_mb: Option<usize>Target memory per batch in MB. Mutually exclusive with batch_size.
throttle_ms: Option<u64>§statement_timeout_s: Option<u64>§max_retries: Option<u32>§retry_backoff_ms: Option<u64>§lock_timeout_s: Option<u64>§memory_threshold_mb: Option<usize>§max_batch_memory_mb: Option<usize>Hard cap on Arrow batch memory in MB. When a batch exceeds this limit,
on_batch_memory_exceeded determines the response.
on_batch_memory_exceeded: Option<BatchMemoryPolicy>Policy applied when a batch exceeds max_batch_memory_mb. Default: warn.
adaptive: Option<bool>Enable real-time batch size adaptation based on DB pressure metrics.
Postgres: samples pg_stat_bgwriter. MySQL: samples Innodb_log_waits.
Also arms the OPT-2 concurrency governor when parallel > 1.
min_parallel: Option<usize>Floor for the concurrency governor (lowest parallelism under pressure).
Default 1. Ceiling is the export’s parallel.
max_value_mb: Option<usize>Hard per-value size ceiling in MB. A single text/JSON/blob cell larger
than this aborts the run with RIVET_VALUE_TOO_LARGE. 0 disables the
guard. Default: 256.
Trait Implementations§
Source§impl Clone for TuningConfig
impl Clone for TuningConfig
Source§fn clone(&self) -> TuningConfig
fn clone(&self) -> TuningConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TuningConfig
impl Debug for TuningConfig
Source§impl Default for TuningConfig
impl Default for TuningConfig
Source§fn default() -> TuningConfig
fn default() -> TuningConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TuningConfig
impl<'de> Deserialize<'de> for TuningConfig
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
Source§impl JsonSchema for TuningConfig
impl JsonSchema for TuningConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for TuningConfig
impl RefUnwindSafe for TuningConfig
impl Send for TuningConfig
impl Sync for TuningConfig
impl Unpin for TuningConfig
impl UnsafeUnpin for TuningConfig
impl UnwindSafe for TuningConfig
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