pub struct ParallelConfig {
pub enabled: bool,
pub max_concurrency: Option<usize>,
pub batch_size: Option<usize>,
}Expand description
Configuration for parallel processing operations.
This struct controls how debtmap executes batch operations like multi-file analysis. When enabled, files are processed concurrently using rayon’s thread pool.
§Example
use debtmap::config::ParallelConfig;
let config = ParallelConfig {
enabled: true,
max_concurrency: Some(4),
batch_size: Some(50),
};Fields§
§enabled: boolEnable parallel processing (default: true)
When disabled, files are processed sequentially. Useful for debugging or when running in constrained environments.
max_concurrency: Option<usize>Maximum concurrent operations (default: num_cpus)
Limits the number of concurrent file analyses. If None, uses all available CPU cores.
batch_size: Option<usize>Batch size for chunked processing (default: 100)
Large codebases are processed in batches to prevent resource exhaustion and enable progress reporting.
Implementations§
Source§impl ParallelConfig
impl ParallelConfig
Sourcepub fn sequential() -> Self
pub fn sequential() -> Self
Create a config with parallel processing disabled.
Sourcepub fn effective_concurrency(&self) -> usize
pub fn effective_concurrency(&self) -> usize
Get the effective concurrency level.
Returns the configured max_concurrency, or the number of available CPU cores if not specified.
Sourcepub fn effective_batch_size(&self) -> usize
pub fn effective_batch_size(&self) -> usize
Get the effective batch size.
Trait Implementations§
Source§impl Clone for ParallelConfig
impl Clone for ParallelConfig
Source§fn clone(&self) -> ParallelConfig
fn clone(&self) -> ParallelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParallelConfig
impl Debug for ParallelConfig
Source§impl Default for ParallelConfig
impl Default for ParallelConfig
Source§impl<'de> Deserialize<'de> for ParallelConfig
impl<'de> Deserialize<'de> for ParallelConfig
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>,
Source§impl PartialEq for ParallelConfig
impl PartialEq for ParallelConfig
Source§impl Serialize for ParallelConfig
impl Serialize for ParallelConfig
impl StructuralPartialEq for ParallelConfig
Auto Trait Implementations§
impl Freeze for ParallelConfig
impl RefUnwindSafe for ParallelConfig
impl Send for ParallelConfig
impl Sync for ParallelConfig
impl Unpin for ParallelConfig
impl UnsafeUnpin for ParallelConfig
impl UnwindSafe for ParallelConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> EnsureExt<T> for T
impl<T> EnsureExt<T> for T
Source§fn ensure<P, E>(self, predicate: P, error: E) -> Validation<T, NonEmptyVec<E>>where
P: Predicate<T>,
fn ensure<P, E>(self, predicate: P, error: E) -> Validation<T, NonEmptyVec<E>>where
P: Predicate<T>,
Source§fn ensure_with<P, E, F>(
self,
predicate: P,
error_fn: F,
) -> Validation<T, NonEmptyVec<E>>
fn ensure_with<P, E, F>( self, predicate: P, error_fn: F, ) -> Validation<T, NonEmptyVec<E>>
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>
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