pub struct WriterProfile {
pub writers: usize,
pub flush_chunk: usize,
pub file_buf: usize,
pub stage_cap: usize,
}Expand description
A concrete writer configuration: everything that used to be hard-coded
consts (STAGE_FLUSH, STAGE_TOTAL_CAP) or env-only knobs, as one value.
Fields§
§writers: usizeNumber of writer threads (target; growth is deferred in auto mode).
flush_chunk: usizePer-table staging threshold: a table’s staged bytes ship to its writer once they cross this size.
file_buf: usizePer-file output buffer: writer threads coalesce chunks up to this size before issuing the actual file write.
stage_cap: usizeCap on total bytes staged across all tables on the producer side.
Implementations§
Source§impl WriterProfile
impl WriterProfile
Sourcepub fn for_kind(kind: ProfileKind, cores: usize, compressing: bool) -> Self
pub fn for_kind(kind: ProfileKind, cores: usize, compressing: bool) -> Self
The named profile table from the design doc.
compressing matters only for Fast: compression is CPU-bound on
fast media, so it gets all cores there. Per the 2026-07-16 amendment,
the slow profiles pin writers to 1 unconditionally — on seek-bound
media extra compression writers thrash the spindle and end up slower
than plain output (measured 22.1 vs 34.5 MB/s at 100 GB scale).
Sourcepub fn with_env_overrides(self) -> Self
pub fn with_env_overrides(self) -> Self
Apply the expert env overrides. Precedence: env > explicit flag > auto — these two knobs predate the profiles and keep working, pinning their value across every profile the controller may switch to.
SQL_SPLITTER_WRITERS: writer count (also disables deferred growth).SQL_SPLITTER_WRITE_BUF: per-file output buffer size in bytes.
Trait Implementations§
Source§impl Clone for WriterProfile
impl Clone for WriterProfile
Source§fn clone(&self) -> WriterProfile
fn clone(&self) -> WriterProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WriterProfile
Source§impl Debug for WriterProfile
impl Debug for WriterProfile
impl Eq for WriterProfile
Source§impl PartialEq for WriterProfile
impl PartialEq for WriterProfile
impl StructuralPartialEq for WriterProfile
Auto Trait Implementations§
impl Freeze for WriterProfile
impl RefUnwindSafe for WriterProfile
impl Send for WriterProfile
impl Sync for WriterProfile
impl Unpin for WriterProfile
impl UnsafeUnpin for WriterProfile
impl UnwindSafe for WriterProfile
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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