pub struct PaneExecutionPolicy {
pub forced_strategy: Option<PaneMemoryStrategy>,
pub conservative: bool,
pub persistent_min_operations: usize,
pub persistent_local_fraction_pct: u32,
pub persistent_burst_ops_per_sec: u32,
pub hysteresis_pct: u32,
pub retention: PaneRetentionPolicy,
}Expand description
Deterministic policy that selects among the three pane execution strategies.
The thresholds are explicit and tunable; defaults are derived from the
persistence spike (bd-1k7ek.5) and the memory telemetry (bd-25wj7.1): the
persistent store earns its keep on resize-dominated bursts deep enough that
O(1) navigation and structural sharing pay off, while the checkpointed
timeline is the safe default everywhere else.
Fields§
§forced_strategy: Option<PaneMemoryStrategy>Force a specific strategy (operator/debug override). None = adaptive.
conservative: boolForce the conservative certified path (checkpointed). Overrides adaptation.
persistent_min_operations: usizeMinimum operations before the persistent store is considered.
persistent_local_fraction_pct: u32Minimum local-op fraction (percent) for the persistent store.
persistent_burst_ops_per_sec: u32Minimum peak ops/sec (burstiness) for the persistent store.
hysteresis_pct: u32Hysteresis margin (percent, on the local fraction) used by
reselect to avoid thrashing near a threshold.
retention: PaneRetentionPolicyThe retention policy carried alongside the selected strategy.
Implementations§
Source§impl PaneExecutionPolicy
impl PaneExecutionPolicy
Sourcepub const DEFAULT_PERSISTENT_MIN_OPERATIONS: usize = 64
pub const DEFAULT_PERSISTENT_MIN_OPERATIONS: usize = 64
Default: persistent only past the spike’s bounded-window depth.
Sourcepub const DEFAULT_PERSISTENT_LOCAL_FRACTION_PCT: u32 = 80
pub const DEFAULT_PERSISTENT_LOCAL_FRACTION_PCT: u32 = 80
Default: persistent only when the workload is resize-dominated.
Sourcepub const DEFAULT_PERSISTENT_BURST_OPS_PER_SEC: u32 = 60
pub const DEFAULT_PERSISTENT_BURST_OPS_PER_SEC: u32 = 60
Default: persistent only under a drag-resize burst.
Sourcepub const DEFAULT_HYSTERESIS_PCT: u32 = 10
pub const DEFAULT_HYSTERESIS_PCT: u32 = 10
Default hysteresis margin.
Sourcepub const fn adaptive(retention: PaneRetentionPolicy) -> Self
pub const fn adaptive(retention: PaneRetentionPolicy) -> Self
An adaptive policy with the default thresholds, carrying retention.
Sourcepub const fn conservative(self) -> Self
pub const fn conservative(self) -> Self
Return this policy forced to the conservative certified path (checkpointed).
Sourcepub const fn forcing(self, strategy: PaneMemoryStrategy) -> Self
pub const fn forcing(self, strategy: PaneMemoryStrategy) -> Self
Return this policy forced to a specific strategy.
Sourcepub fn select(&self, profile: PaneWorkloadProfile) -> PaneExecutionDecision
pub fn select(&self, profile: PaneWorkloadProfile) -> PaneExecutionDecision
Select a strategy for profile (stateless, deterministic).
Sourcepub fn reselect(
&self,
profile: PaneWorkloadProfile,
previous: PaneMemoryStrategy,
) -> PaneExecutionDecision
pub fn reselect( &self, profile: PaneWorkloadProfile, previous: PaneMemoryStrategy, ) -> PaneExecutionDecision
Re-select with hysteresis given the previous strategy: keep previous
unless the workload favors a different strategy by a clear margin. This
prevents thrashing when the local-op fraction jitters near a threshold.
Forced/conservative overrides ignore hysteresis.
Trait Implementations§
Source§impl Clone for PaneExecutionPolicy
impl Clone for PaneExecutionPolicy
Source§fn clone(&self) -> PaneExecutionPolicy
fn clone(&self) -> PaneExecutionPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PaneExecutionPolicy
Source§impl Debug for PaneExecutionPolicy
impl Debug for PaneExecutionPolicy
impl Eq for PaneExecutionPolicy
Source§impl PartialEq for PaneExecutionPolicy
impl PartialEq for PaneExecutionPolicy
Source§fn eq(&self, other: &PaneExecutionPolicy) -> bool
fn eq(&self, other: &PaneExecutionPolicy) -> bool
self and other values to be equal, and is used by ==.