Snapshot of all engine budget states (for metrics/debugging).
(&self)
| 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. |