pub struct JitCache { /* private fields */ }Expand description
Cache for JIT-compiled graphs with profiling support.
Implementations§
Source§impl JitCache
impl JitCache
Sourcepub fn insert(&self, key: JitKey, compiled: CompiledGraph, is_specialized: bool)
pub fn insert(&self, key: JitKey, compiled: CompiledGraph, is_specialized: bool)
Insert a compiled graph into the cache.
Sourcepub fn get(&self, key: &JitKey) -> Option<CompiledGraph>
pub fn get(&self, key: &JitKey) -> Option<CompiledGraph>
Retrieve a compiled graph from the cache.
Sourcepub fn record_execution(&self, key: &JitKey, duration: Duration)
pub fn record_execution(&self, key: &JitKey, duration: Duration)
Record an execution of a cached graph.
Sourcepub fn get_stats(&self, key: &JitKey) -> Option<JitEntryStats>
pub fn get_stats(&self, key: &JitKey) -> Option<JitEntryStats>
Get statistics for a cached entry.
Sourcepub fn get_hot_paths(&self) -> Vec<(JitKey, JitEntryStats)>
pub fn get_hot_paths(&self) -> Vec<(JitKey, JitEntryStats)>
Get all hot paths (frequently executed graphs).
Sourcepub fn get_cold_paths(&self) -> Vec<(JitKey, JitEntryStats)>
pub fn get_cold_paths(&self) -> Vec<(JitKey, JitEntryStats)>
Get all cold paths (rarely executed graphs).
Sourcepub fn cache_stats(&self) -> JitCacheStats
pub fn cache_stats(&self) -> JitCacheStats
Get cache statistics.
Auto Trait Implementations§
impl Freeze for JitCache
impl RefUnwindSafe for JitCache
impl Send for JitCache
impl Sync for JitCache
impl Unpin for JitCache
impl UnwindSafe for JitCache
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
Mutably borrows from an owned value. Read more