MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / usage_ratio

Method usage_ratio

graphlite/src/exec/memory_budget.rs:182–187  ·  view source on GitHub ↗

ROADMAP v0.2.0 - Memory usage ratio for adaptive behavior (see ROADMAP.md §1)

(&self)

Source from the content-addressed store, hash-verified

180 /// - >1.0 = over budget (should not happen)
181 #[allow(dead_code)] // ROADMAP v0.2.0 - Memory usage ratio for adaptive behavior (see ROADMAP.md §1)
182 pub fn usage_ratio(&self) -> f64 {
183 if self.limit == 0 {
184 return 0.0;
185 }
186 self.allocated() as f64 / self.limit as f64
187 }
188
189 /// Check if we're approaching the memory limit
190 ///

Callers 1

is_approaching_limitMethod · 0.80

Calls 1

allocatedMethod · 0.80

Tested by

no test coverage detected