Skip to main content


Analyzes JavaScript heap and finds memory leaks in browser and node.js

Define Your Test

Define E2E test scenarios on browser interaction:

// test.js
function url() {
return ',+CA/';
async function action(page) {
async function back(page) {
module.exports = {action, back, url};

Run memlab in CLI

Find memory leaks with the custom E2E test scenario:

$ memlab run --scenario test.js
Support memory analyses for the previous browser test:
# Analyze duplicated string in heap
$ memlab analyze string
# Check unbound object growth
$ memlab analyze unbound-object
# Get shapes with unbound growth
$ memlab analyze unbound-shape
# Discover more memory analyses
$ memlab analyze -h

Programming API

Memory analysis for JavaScript heap snapshots:

const {findLeaks, takeSnapshots} = require('@memlab/api');
async function test() {
const scenario = {
url: () => '',
const result = await takeSnapshots({scenario});
const leaks = findLeaks(result);
// ...

Who's using memlab?