pub struct PerformanceConfig {
pub max_parallel_scans: u32,
pub scan_timeout_secs: u64,
pub static_concurrency: Option<usize>,
pub per_repo_timeout_secs: Option<u64>,
pub scheduler_tick_secs: Option<u64>,
pub chain_lane_concurrency: Option<usize>,
pub fast_lane_concurrency: Option<usize>,
}Fields§
§max_parallel_scans: u32§scan_timeout_secs: u64§static_concurrency: Option<usize>Explicit override for the per-run static-pass fan-out.
None -> dispatcher computes min(num_cpus / 2, len(repos)).
Some(n) -> use exactly n.max(1) parallel jobs.
per_repo_timeout_secs: Option<u64>Per-repo budget for the static-pass scan. A scan that exceeds
the budget is killed and its repo bundle records
Inconclusive(StaticPassTimeout) while the rest of the run
continues. None -> 30 minutes.
scheduler_tick_secs: Option<u64>Cadence at which the cron scheduler wakes to evaluate
[[schedule]] entries. None -> 60 seconds (matches the
granularity of the standard 5-field cron expression).
Floored at 1 second by PerformanceConfig::scheduler_tick.
Operators should only lower this when a sub-minute cron
granularity is required; tighter polling spends more CPU.
chain_lane_concurrency: Option<usize>Per-lane simultaneous-spinup cap for the chain lane. None
-> built-in default (2). Mirrors
nyx_agent_sandbox::LaneConcurrency::DEFAULT_CHAIN. A configured
0 is floored to 1 by
PerformanceConfig::chain_lane_concurrency_resolved.
fast_lane_concurrency: Option<usize>Per-lane simultaneous-spinup cap for the fast lane. None
-> built-in default (8). Mirrors
nyx_agent_sandbox::LaneConcurrency::DEFAULT_FAST. A configured
0 is floored to 1 by
PerformanceConfig::fast_lane_concurrency_resolved.
Implementations§
Source§impl PerformanceConfig
impl PerformanceConfig
Sourcepub const DEFAULT_CHAIN_LANE_CONCURRENCY: usize = 2
pub const DEFAULT_CHAIN_LANE_CONCURRENCY: usize = 2
Built-in fallback for the chain-lane simultaneous-spinup cap.
Mirrors nyx_agent_sandbox::LaneConcurrency::DEFAULT_CHAIN; kept
duplicated here so this crate has no reverse dep on the sandbox
crate. The two values must stay in sync.
Sourcepub const DEFAULT_FAST_LANE_CONCURRENCY: usize = 8
pub const DEFAULT_FAST_LANE_CONCURRENCY: usize = 8
Built-in fallback for the fast-lane simultaneous-spinup cap.
Mirrors nyx_agent_sandbox::LaneConcurrency::DEFAULT_FAST.
Sourcepub fn per_repo_timeout(&self) -> Duration
pub fn per_repo_timeout(&self) -> Duration
Resolved per-repo timeout. Falls back to 30 minutes when the
operator has not set [performance] per_repo_timeout_secs.
Sourcepub fn static_concurrency_override(&self) -> Option<usize>
pub fn static_concurrency_override(&self) -> Option<usize>
Resolved static-pass fan-out. Returns None when the operator
has not set [performance] static_concurrency; the dispatcher
then derives the default from CPU count and repo count.
Sourcepub fn scheduler_tick(&self) -> Duration
pub fn scheduler_tick(&self) -> Duration
Resolved scheduler wake cadence. Falls back to 60 seconds when
the operator has not set [performance] scheduler_tick_secs;
a configured 0 is floored to 1 so the loop cannot busy-wait.
Sourcepub fn chain_lane_concurrency_resolved(&self) -> usize
pub fn chain_lane_concurrency_resolved(&self) -> usize
Resolved chain-lane spinup cap. Falls back to
Self::DEFAULT_CHAIN_LANE_CONCURRENCY when the operator has
not set [performance] chain_lane_concurrency; a configured
0 is floored to 1 so the worker pool cannot deadlock.
Sourcepub fn fast_lane_concurrency_resolved(&self) -> usize
pub fn fast_lane_concurrency_resolved(&self) -> usize
Resolved fast-lane spinup cap. Falls back to
Self::DEFAULT_FAST_LANE_CONCURRENCY when the operator has
not set [performance] fast_lane_concurrency; a configured
0 is floored to 1.
Trait Implementations§
Source§impl Clone for PerformanceConfig
impl Clone for PerformanceConfig
Source§fn clone(&self) -> PerformanceConfig
fn clone(&self) -> PerformanceConfig
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 PerformanceConfig
impl Debug for PerformanceConfig
Source§impl Default for PerformanceConfig
impl Default for PerformanceConfig
Source§impl<'de> Deserialize<'de> for PerformanceConfigwhere
PerformanceConfig: Default,
impl<'de> Deserialize<'de> for PerformanceConfigwhere
PerformanceConfig: Default,
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 PerformanceConfig
impl PartialEq for PerformanceConfig
Source§fn eq(&self, other: &PerformanceConfig) -> bool
fn eq(&self, other: &PerformanceConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PerformanceConfig
impl Serialize for PerformanceConfig
impl Eq for PerformanceConfig
impl StructuralPartialEq for PerformanceConfig
Auto Trait Implementations§
impl Freeze for PerformanceConfig
impl RefUnwindSafe for PerformanceConfig
impl Send for PerformanceConfig
impl Sync for PerformanceConfig
impl Unpin for PerformanceConfig
impl UnsafeUnpin for PerformanceConfig
impl UnwindSafe for PerformanceConfig
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<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<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