MemoryLoadSignal
Implements
Index
Constructors
constructor
Parameters
options: MemoryLoadSignalOptions
Returns MemoryLoadSignal
Properties
readonlyname
Human-readable name used in logging and SystemInfo keys.
readonlyoverloadedRatio
Maximum ratio of overloaded snapshots in a sample before the signal
is considered overloaded. For example, 0.2 means the signal fires
when more than 20% of the sample window is overloaded.
Methods
getMemorySnapshots
Returns typed memory snapshots for backward compatibility with
Snapshotter.Returns MemorySnapshot[]
getSample
Return snapshots for a recent time window (used for "current" status).
Parameters
optionalsampleDurationMillis: number
How far back to look, in milliseconds.
Returns MemorySnapshot[]
start
Start collecting snapshots. Called when the pool starts.
Returns Promise<void>
stop
Stop collecting snapshots. Called when the pool shuts down.
Returns Promise<void>
Tracks memory usage via
SYSTEM_INFOevents and reports overload when the used-to-available memory ratio exceeds a threshold.