Utilization as a percentage (0-100). Computed in `u128` so a corrupted (e.g. underflow-wrapped near `usize::MAX`) `allocated` clamps to 100 % rather than panicking on `allocated * 100` overflow — a panic here is taken inside the Data Plane core loop (`apply_spsc_pressure` → `snapshot`) and escalates to a DEGRADED core.
(&self)
| 190 | /// Plane core loop (`apply_spsc_pressure` → `snapshot`) and escalates |
| 191 | /// to a DEGRADED core. |
| 192 | pub fn utilization_percent(&self) -> u8 { |
| 193 | let limit = self.limit(); |
| 194 | if limit == 0 { |
| 195 | return 100; |
| 196 | } |
| 197 | let allocated = self.allocated() as u128; |
| 198 | ((allocated * 100) / limit as u128).min(100) as u8 |
| 199 | } |
| 200 | |
| 201 | /// Peak allocation (high-water mark). |
| 202 | pub fn peak(&self) -> usize { |
no test coverage detected