Skip to main content

HotCache

Struct HotCache 

Source
pub struct HotCache {
    pub plan: Option<ExecutionPlan>,
    pub trie: Option<PredictionTrieNode>,
    pub agent_hints_default: Option<AgentHints>,
    pub acg_profiles: HashMap<String, StabilityAnalysisResult>,
    pub acg_profile_observation_counts: HashMap<String, u32>,
    pub acg_stability: Option<StabilityAnalysisResult>,
    pub acg_observation_count: u32,
}
Expand description

In-memory cache of adaptive artifacts needed on the hot path.

The adaptive runtime keeps this structure in an std::sync::RwLock so intercepts and event-processing tasks can exchange recently learned plans, trie state, and Adaptive Cache Governor (ACG) summaries without hitting the configured backend on every request.

Fields§

§plan: Option<ExecutionPlan>

Current execution plan used for tool parallelism hints.

§trie: Option<PredictionTrieNode>

Prediction trie used to derive default latency sensitivity hints.

§agent_hints_default: Option<AgentHints>

Default agent-level hints computed from the prediction trie.

§acg_profiles: HashMap<String, StabilityAnalysisResult>

Per-profile ACG stability results keyed by derived profile identifier.

§acg_profile_observation_counts: HashMap<String, u32>

Observation counts corresponding to entries in Self::acg_profiles.

§acg_stability: Option<StabilityAnalysisResult>

Aggregate ACG stability result used for warm-first eligibility checks.

§acg_observation_count: u32

Observation count associated with Self::acg_stability.

Trait Implementations§

Source§

impl Clone for HotCache

Source§

fn clone(&self) -> HotCache

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 Debug for HotCache

Source§

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

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

impl<'de> Deserialize<'de> for HotCache

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HotCache

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

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<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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,