memlab is an E2E testing and analysis framework for finding JavaScript memory leaks and optimization opportunities.

Features

  • Browser memory leak detection - Write test scenario with puppeteer API, memlab auto diffs JS heap snapshots, filters out memory leaks, and aggregates results.
  • Object-oriented heap traversing API - Supports self-defined memory leak detector and programmatically analyzing JS heap snapshots taken from Chromium-based browsers, Node.js, Electron.js, and Hermes
  • Memory CLI toolbox - Built-in toolbox and APIs for finding memory optimization opportunities (not necessarily memory leaks)
  • Memory assertions in Node.js - Enables unit test or running node.js program to take a heap snapshot of its own state, do self memory checking, or write advanced memory assertions


License

memlab is an open-source project that is released under the MIT license.

Resources

  1. Source code
  2. Download
  3. https://engineering.fb.com/2022/09/12/open-source/memlab/