Skip to main content

PaneExecutionPolicy

Struct PaneExecutionPolicy 

Source
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: bool

Force the conservative certified path (checkpointed). Overrides adaptation.

§persistent_min_operations: usize

Minimum operations before the persistent store is considered.

§persistent_local_fraction_pct: u32

Minimum local-op fraction (percent) for the persistent store.

§persistent_burst_ops_per_sec: u32

Minimum peak ops/sec (burstiness) for the persistent store.

§hysteresis_pct: u32

Hysteresis margin (percent, on the local fraction) used by reselect to avoid thrashing near a threshold.

§retention: PaneRetentionPolicy

The retention policy carried alongside the selected strategy.

Implementations§

Source§

impl PaneExecutionPolicy

Source

pub const DEFAULT_PERSISTENT_MIN_OPERATIONS: usize = 64

Default: persistent only past the spike’s bounded-window depth.

Source

pub const DEFAULT_PERSISTENT_LOCAL_FRACTION_PCT: u32 = 80

Default: persistent only when the workload is resize-dominated.

Source

pub const DEFAULT_PERSISTENT_BURST_OPS_PER_SEC: u32 = 60

Default: persistent only under a drag-resize burst.

Source

pub const DEFAULT_HYSTERESIS_PCT: u32 = 10

Default hysteresis margin.

Source

pub const fn adaptive(retention: PaneRetentionPolicy) -> Self

An adaptive policy with the default thresholds, carrying retention.

Source

pub const fn conservative(self) -> Self

Return this policy forced to the conservative certified path (checkpointed).

Source

pub const fn forcing(self, strategy: PaneMemoryStrategy) -> Self

Return this policy forced to a specific strategy.

Source

pub fn select(&self, profile: PaneWorkloadProfile) -> PaneExecutionDecision

Select a strategy for profile (stateless, deterministic).

Source

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

Source§

fn clone(&self) -> PaneExecutionPolicy

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PaneExecutionPolicy

Source§

impl Debug for PaneExecutionPolicy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for PaneExecutionPolicy

Source§

impl PartialEq for PaneExecutionPolicy

Source§

fn eq(&self, other: &PaneExecutionPolicy) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for PaneExecutionPolicy

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PaneExecutionPolicy

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.