Build the governor exactly as the server does on a fresh boot: default engine fractions of a 1 GiB ceiling.
()
| 75 | /// Build the governor exactly as the server does on a fresh boot: |
| 76 | /// default engine fractions of a 1 GiB ceiling. |
| 77 | fn fresh_boot_governor() -> Arc<MemoryGovernor> { |
| 78 | let global = 1024 * 1024 * 1024usize; |
| 79 | let budgets = EngineConfig::default().to_byte_budgets(global); |
| 80 | init_governor(global, &budgets).expect("default config must produce a governor") |
| 81 | } |
| 82 | |
| 83 | /// `MemoryGovernor::engine_pressure` returns `PressureLevel::Emergency` |
| 84 | /// for any engine that has no budget registered. The Data Plane calls |