MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / snapshot

Method snapshot

nodedb-mem/src/governor.rs:452–464  ·  view source on GitHub ↗

Snapshot of all engine budget states (for metrics/debugging).

(&self)

Source from the content-addressed store, hash-verified

450
451 /// Snapshot of all engine budget states (for metrics/debugging).
452 pub fn snapshot(&self) -> Vec<EngineSnapshot> {
453 self.budgets
454 .iter()
455 .map(|(engine, budget)| EngineSnapshot {
456 engine: *engine,
457 allocated: budget.allocated(),
458 limit: budget.limit(),
459 peak: budget.peak(),
460 rejections: budget.rejections(),
461 utilization_percent: budget.utilization_percent(),
462 })
463 .collect()
464 }
465}
466
467/// Point-in-time snapshot of an engine's memory state.

Calls 7

collectMethod · 0.80
allocatedMethod · 0.80
peakMethod · 0.80
rejectionsMethod · 0.80
utilization_percentMethod · 0.80
iterMethod · 0.45
limitMethod · 0.45

Tested by 1