pub struct CircuitConfig {
pub layout: Layout,
pub max_rss_bytes: Option<u64>,
pub pin_cpus: Vec<usize>,
pub mode: Mode,
pub step_size: StepSize,
pub storage: Option<CircuitStorageConfig>,
pub dev_tweaks: DevTweaks,
pub exchange_listener: Option<TcpListener>,
}Expand description
A config for instantiating a multithreaded/multihost runtime to execute circuits.
As opposed to RuntimeConfig, this struct stores state about which hosts
run the circuit and where they store data, e.g., state typically not
tunable/exposed by the user.
Fields§
§layout: LayoutHow the circuit is laid out across one or multiple machines.
max_rss_bytes: Option<u64>The maximum amount of memory, in bytes, that the process is allowed to use. Used to calculate the memory pressure level.
pin_cpus: Vec<usize>Optionally, CPU numbers for pinning the worker threads.
mode: Mode§step_size: StepSizeWhether the circuit can use microsteps.
storage: Option<CircuitStorageConfig>Storage configuration. If present, then storage is enabled.
dev_tweaks: DevTweaksParsed from RuntimeConfig for use by the circuit.
exchange_listener: Option<TcpListener>Optionally, the TCP socket on which to listen for exchange. This is
relevant only if layout is multihost. If it is provided, then the
socket must be listening on the port indicated for this host in
layout.
Implementations§
Source§impl CircuitConfig
impl CircuitConfig
pub fn with_workers(n: usize) -> Self
pub fn with_max_rss_bytes(self, max_rss: Option<u64>) -> Self
pub fn with_mode(self, mode: Mode) -> Self
pub fn with_step_size(self, step_size: StepSize) -> Self
pub fn with_pin_cpus(self, pin_cpus: Vec<usize>) -> Self
pub fn with_storage(self, storage: Option<CircuitStorageConfig>) -> Self
pub fn with_dev_tweaks(self, dev_tweaks: DevTweaks) -> Self
pub fn with_streaming_exchange(self, enabled: bool) -> Self
pub fn with_splitter_chunk_size_records(self, records: u64) -> Self
pub fn with_buffer_cache_strategy(self, strategy: BufferCacheStrategy) -> Self
pub fn with_buffer_max_buckets(self, max_buckets: Option<usize>) -> Self
pub fn with_buffer_cache_allocation_strategy( self, strategy: BufferCacheAllocationStrategy, ) -> Self
pub fn with_balancer_min_relative_improvement_threshold( self, threshold: f64, ) -> Self
pub fn with_balancer_min_absolute_improvement_threshold( self, threshold: u64, ) -> Self
pub fn with_balancer_balance_tax(self, tax: f64) -> Self
pub fn with_exchange_listener(self, exchange_listener: TcpListener) -> Self
Trait Implementations§
Source§impl Default for CircuitConfig
impl Default for CircuitConfig
Source§impl From<Layout> for CircuitConfig
impl From<Layout> for CircuitConfig
Source§impl From<NonZero<usize>> for CircuitConfig
impl From<NonZero<usize>> for CircuitConfig
Source§fn from(n_workers: NonZeroUsize) -> Self
fn from(n_workers: NonZeroUsize) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for CircuitConfig
impl !UnwindSafe for CircuitConfig
impl Freeze for CircuitConfig
impl Send for CircuitConfig
impl Sync for CircuitConfig
impl Unpin for CircuitConfig
impl UnsafeUnpin for CircuitConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<T> ErasedDestructor for Twhere
T: 'static,
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