# jest-heap-graph

> plot jest tests heap usage graph

Latest version **1.1.0** (published 2021-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install jest-heap-graph
pnpm add jest-heap-graph
yarn add jest-heap-graph
bun add jest-heap-graph
```

Provides the command `jest-heap-graph`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-09-10 |
| First published | 2021-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 10 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | chauchakching |
| Maintainers | chauchakching |
| Keywords | oclif |

## Links

- npm: https://www.npmjs.com/package/jest-heap-graph
- Repository: https://github.com/chauchakching/jest-heap-graph
- Issues: https://github.com/chauchakching/jest-heap-graph/issues
- npm.io page: https://npm.io/package/jest-heap-graph

## Dependencies (10)

- [ink](https://npm.io/package/ink.md) ^3.0.9
- [fp-ts](https://npm.io/package/fp-ts.md) ^2.11.1
- [react](https://npm.io/package/react.md) ^17.0.2
- [tslib](https://npm.io/package/tslib.md) ^1
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.4
- [asciichart](https://npm.io/package/asciichart.md) ^1.5.25
- [import-jsx](https://npm.io/package/import-jsx.md) ^4.0.0
- [@oclif/config](https://npm.io/package/@oclif/config.md) ^1
- [@oclif/command](https://npm.io/package/@oclif/command.md) ^1
- [@oclif/plugin-help](https://npm.io/package/@oclif/plugin-help.md) ^3

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2021-09-10
- 1.0.0 — 2021-09-10

## README

# jest-heap-graph

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/jest-heap-graph.svg)](https://npmjs.org/package/jest-heap-graph)
[![Downloads/week](https://img.shields.io/npm/dw/jest-heap-graph.svg)](https://npmjs.org/package/jest-heap-graph)
[![License](https://img.shields.io/npm/l/jest-heap-graph.svg)](https://github.com/chauchakching/jest-heap-graph/blob/master/package.json)

Command line tool to plot jest tests heap usage graph. 

Help you observe the memory usage and find the root cause of memory leak.

The tool run your command, extract the `stderr` and plot graph using [ink](https://github.com/vadimdemedes/ink) and [asciichart](https://github.com/kroitor/asciichart)

# Getting started

Put your command that run jest tests as the first argument.

```bash
# install cli globally
> npm install -g jest-heap-graph

# or use npx to run it directly
> npx jest-heap-graph "yarn jest --logHeapUsage"

# check CLI usage
> jest-heap-graph -h

# run the globally installed cli
> jest-heap-graph "yarn jest --logHeapUsage"
PASS src/test/dummy-113..test.js (1929 MB heap size)
PASS src/test/dummy-114.test.js (1940 MB heap size)
PASS src/test/dummy-115.test.js (1959 MB heap size)

Test Suites: 115 passed, 115 total
Tests:       115 passed, 115 total
Snapshots:   0 total
Time:        30.371 s, estimated 31 s
Ran all test suites.

--- n: 115 ---
    1959.00 ┤                                                                                        ╭
    1902.30 ┤                                                                                   ╭────╯
    1845.60 ┤                                                                         ╭╮   ╭────╯
    1788.90 ┤                                                                       ╭╮│╰───╯
    1732.20 ┤                                                                  ╭╮ ╭─╯╰╯
    1675.50 ┤                                                              ╭╮╭─╯╰─╯
    1618.80 ┤                                               ╭╮        ╭╮╭╮ │╰╯
    1562.10 ┤                                               ││     ╭╮ │╰╯╰─╯
    1505.40 ┤                                     ╭╮  ╭╮ ╭╮╭╯│╭╮ ╭─╯╰─╯
    1448.70 ┤                                     ││ ╭╯│╭╯╰╯ ╰╯╰─╯
    1392.00 ┤                               ╭╮   ╭╯│╭╯ ││
    1335.30 ┤                           ╭╮ ╭╯│ ╭─╯ ││  ╰╯
    1278.60 ┤                           ││ │ │╭╯   ╰╯
    1221.90 ┤                    ╭╮    ╭╯│╭╯ ╰╯
    1165.20 ┤                ╭╮ ╭╯│╭╮╭─╯ ╰╯
    1108.50 ┤        ╭╮  ╭╮ ╭╯│╭╯ ││╰╯
    1051.80 ┤    ╭╮  ││ ╭╯│╭╯ ││  ╰╯
     995.10 ┤╭╮  ││ ╭╯│╭╯ ││  ╰╯
     938.40 ┤││ ╭╯│╭╯ ╰╯  ╰╯
     881.70 ┼╯│╭╯ ╰╯
     825.00 ┤ ╰╯
```

---
_Source: https://npm.io/package/jest-heap-graph · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
