Skip to main content
Version: Next

MemoryLoadSignal

Tracks memory usage via SYSTEM_INFO events and reports overload when the used-to-available memory ratio exceeds a threshold.

Implements

Index

Constructors

constructor

Properties

readonlyname

name: memInfo = 'memInfo'

Human-readable name used in logging and SystemInfo keys.

readonlyoverloadedRatio

overloadedRatio: number

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(): Promise<void>
  • Start collecting snapshots. Called when the pool starts.


    Returns Promise<void>

stop

  • stop(): Promise<void>
  • Stop collecting snapshots. Called when the pool shuts down.


    Returns Promise<void>