pub struct PvaStateConfig {
pub max_channels: usize,
pub channel_ttl: Duration,
pub max_operations: usize,
pub max_update_rate: usize,
pub max_memory_bytes: usize,
pub max_search_cache_entries: usize,
}Expand description
Configuration for the PVA state tracker
Fields§
§max_channels: usizeMaximum number of channels to track (default: 40000)
channel_ttl: DurationTime-to-live for channel entries (default: 5 minutes)
max_operations: usizeMaximum number of operations to track per connection
max_update_rate: usizeMaximum update timestamps kept per connection for rate calculation (default: 10000)
max_memory_bytes: usizeCeiling on tracked state in bytes, as reported by PvaStateTracker::memory_estimate.
When the estimate exceeds this, cleanup_expired sheds state in
priority order – debug affordances first, decoded introspection last
– so that a long-running passive observer accumulates coverage
without growing without bound. 0 disables the ceiling.
max_search_cache_entries: usizeHard cap on SEARCH name-cache entries, enforced independently of the memory ceiling so the caches cannot dominate a small budget.
Implementations§
Source§impl PvaStateConfig
impl PvaStateConfig
pub fn new(max_channels: usize, ttl_secs: u64) -> Self
pub fn with_max_update_rate(self, max_update_rate: usize) -> Self
Sourcepub fn with_max_memory_bytes(self, max_memory_bytes: usize) -> Self
pub fn with_max_memory_bytes(self, max_memory_bytes: usize) -> Self
Set the memory ceiling. 0 disables shedding entirely.
Sourcepub fn with_max_operations(self, max_operations: usize) -> Self
pub fn with_max_operations(self, max_operations: usize) -> Self
Set the per-connection operation cap.
Trait Implementations§
Source§impl Clone for PvaStateConfig
impl Clone for PvaStateConfig
Source§fn clone(&self) -> PvaStateConfig
fn clone(&self) -> PvaStateConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more