Skip to main content

rivet/tuning/
mod.rs

1//! Tuning module — resolution of `SourceTuning` from YAML + adaptive helpers.
2//!
3//! Split into three concerns:
4//! - [`profile`] — config types, three baked-in profiles, `SourceTuning`,
5//!   `ResourceSummary`. The bulk of the module's surface lives here.
6//! - [`memory`] — pure schema-based memory estimation
7//!   ([`estimate_row_bytes`], [`compute_batch_size_from_memory`]).
8//! - [`adaptive`] — live-feedback batch sizing
9//!   ([`next_adaptive_batch_size`] + the `ADAPTIVE_*` constants).
10//!
11//! All public symbols are re-exported at the module root so existing
12//! `crate::tuning::SourceTuning` / `crate::tuning::estimate_row_bytes` paths
13//! keep working.
14
15mod adaptive;
16mod memory;
17mod profile;
18
19pub use adaptive::{ADAPTIVE_SAMPLE_INTERVAL, next_adaptive_batch_size};
20pub use memory::estimate_row_bytes;
21pub use profile::{
22    BatchMemoryPolicy, SourceTuning, TuningConfig, TuningProfile, merge_tuning_config,
23};