heapguard
v0.2.0
Published
Lightweight Node heap growth sampling with v8 stats and simple leak-suspect heuristics.
Maintainers
Readme
heapguard
Topics: heap · heapguard · memory · mern-packages · merndev · nodejs · npm-pm · observability · performance · typescript
heapguard samples Node heap usage, exposes v8 heap statistics, and runs a tiny growth-factor monitor for leak suspects (MVP heuristic — pair with APM for production).
import { monitor, sampleHeap, heapStatistics } from "heapguard";
const stop = monitor({
growthFactor: 1.5,
onLeakSuspect: (a, b, f) => console.warn("heap jump", f, a, b),
});MIT © Aftab Ahmad Khan
