pub struct ParallelismConfig {
pub cpu_cap: f64,
pub min_rows_for_parallel: usize,
}Expand description
병렬 처리 설정 — CPU 사용량 상한 및 임계값 제어
Database::open_with_config() 또는 DbConfig를 통해 전달합니다.
§예시
use dbx_core::engine::parallel_engine::ParallelismConfig;
let config = ParallelismConfig {
cpu_cap: 0.5, // CPU 50%까지만 사용
min_rows_for_parallel: 5000, // 5000행 이상에서만 병렬화
};Fields§
§cpu_cap: f64최대 CPU 코어 사용 비율 (0.0 초과 ~ 1.0 이하). 예: 0.5 → 8코어 머신에서 최대 4개 스레드. 기본값: 1.0 (모든 코어 허용, 단 최대 16개 캡)
min_rows_for_parallel: usize병렬 처리 최소 행 수. 이 미만이면 단일 스레드 실행. 기본값: 1000
Implementations§
Source§impl ParallelismConfig
impl ParallelismConfig
Sourcepub fn conservative() -> Self
pub fn conservative() -> Self
PC를 여유롭게 사용하는 보수적 설정 (CPU 50%, 임계값 5000행)
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
모든 코어를 최대로 활용하는 공격적 설정
Trait Implementations§
Source§impl Clone for ParallelismConfig
impl Clone for ParallelismConfig
Source§fn clone(&self) -> ParallelismConfig
fn clone(&self) -> ParallelismConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ParallelismConfig
impl Debug for ParallelismConfig
Auto Trait Implementations§
impl Freeze for ParallelismConfig
impl RefUnwindSafe for ParallelismConfig
impl Send for ParallelismConfig
impl Sync for ParallelismConfig
impl Unpin for ParallelismConfig
impl UnsafeUnpin for ParallelismConfig
impl UnwindSafe for ParallelismConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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>
Converts
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>
Converts
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