Class ResourceMonitorThrottle
IIngestionThrottle over SP2's Read() (spec 10.2). The table below is evaluated top to bottom, first match wins, and every halving is clamped to MinBatchSize:
LastPressure == Critical | pause, memory:critical |
AvailableMemoryBytes < 48 MiB | pause, memory:floor |
Thermal == Critical | pause, thermal:critical |
Thermal == Serious | batch / 2, delay 250 ms, thermal:serious |
LastPressure == Moderate | batch / 2, memory:moderate |
AvailableMemoryBytes < 96 MiB | batch / 2, memory:warn |
IsLowPowerMode == true | batch = min(batch, 4), delay 100 ms, power:low |
| otherwise | proceed at the configured batch |
public sealed class ResourceMonitorThrottle : IIngestionThrottle
- Inheritance
-
ResourceMonitorThrottle
- Implements
- Inherited Members
Remarks
Unknown and a null memory reading are NO SIGNAL, which is proceed - never "fine" and never a pause. That mirrors EdgeResourceSnapshot's own contract, where every nullable member means unknown. The batch is derived from ConfiguredBatchSize, not from the current one: the runner already applies the lifecycle observer's shrink and takes the smaller of the two, so a throttle that halved the already-halved value would collapse to the floor on the second call. Evaluate(IngestionThrottleContext) never blocks; Read() is a one-second cached read.
Constructors
- ResourceMonitorThrottle(IEdgeResourceMonitor, ResourceMonitorThrottleOptions?)
Creates the throttle.
Properties
- Name
Appears in diagnostics as
throttle.
Methods
- Evaluate(IngestionThrottleContext)
Called before each document and before each write window. Must not block.