Skip to main content

Module engine

Module engine 

Source
Expand description

The sampling pipeline behind every frontend (SPEC §6, §6.2): Sampler → attribution (detect) → idle/orphan → adapters → history → OOM forecast → likely victim, plus the lineage journal (oomtop-state). Implements oomtop_core::provider::SnapshotProvider.

Structs§

Engine

Constants§

ENDED_SESSION_TTL_MS
Ended-session lookups in the lineage journal are repeated at most this often per session.
LINEAGE_EVICT_MS
In-memory lineage entries of processes not seen for this long are dropped after they were persisted (a (pid, start_time) never comes back, and the journal keeps them for the next run). Keeps a long TUI session during builds — thousands of short-lived compilers — from growing without bound (SPEC §14).
ON_DEMAND_BASELINE_MS
On-demand (MCP) calls reuse the previous call’s sample as the CPU baseline when it is this recent.
ON_DEMAND_GAP_MS
Gap between the two samples of an on-demand call without a recent baseline.