# leak-simulator

> Simulates memory leak to test AppDynamics OIT and Node.js memory metrics

Latest version **1.0.1** (published 2021-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install leak-simulator
pnpm add leak-simulator
yarn add leak-simulator
bun add leak-simulator
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-02-19 |
| First published | 2021-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Egon Levy |
| Maintainers | appd-dynalang |

## Links

- npm: https://www.npmjs.com/package/leak-simulator
- npm.io page: https://npm.io/package/leak-simulator

## Dependencies (7)

- [amqp](https://npm.io/package/amqp.md) ^0.2.7
- [amqplib](https://npm.io/package/amqplib.md) ^0.6.0
- [express](https://npm.io/package/express.md) ^4.17.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [sync-fetch](https://npm.io/package/sync-fetch.md) ^0.3.0
- [appdynamics](https://npm.io/package/appdynamics.md) ^21.1.0
- [shady-crypt](https://npm.io/package/shady-crypt.md) ^5.0.3

## Recent versions

- 1.0.1 (latest) — 2021-02-19
- 1.0.0 — 2021-02-19

## README

# Node.js Leak Simulator

The Node.js leak simulator is a simple server script that creates heavy CPU load and a severe memory leak to demonstrate AppDynamics Node.js agent's value in diagnosing memory leaks and excessive resource consumption.

## Usage:

1. Download this package from https://registry.npmjs.org/leak-simulator/-/leak-simulator-1.0.1.tgz to a machine/VM with at least 6 cores and 16 GB of memory.
2. Unzip, open the ``index.js`` file and fill in your AppDynamics configuration details.
3. `` npm install ``
4. `` npm start ``
5. Go to your controller.
6. When the agent reports, open your controller and navigate to the newly discovered NodeJSLeaker application.
7. Navigate to  ``Tiers & Nodes | faucet<-xxx> | Memory``  and turn on the switch for Object Instance Tracking.
8. Wait 5-10 minutes.
9. Navigate to  ``Metric Browser | Application Infrastructure Performance | SuperLeak | Node.js``  to examine CPU, Memory, Garbage Collection and other Node.js server data.
10. Navigate back to  ``Tiers & Nodes | faucet<-xxx> | Memory``  to see a time graph of each tracked object, as well as to view tracked objects sorted by instance count, shallow size, and other metrics.
10. Navigate to  ``Metric Browser | Application Infrastructure Performance | SuperLeak | faucet<-xxx> | Object Instance Tracking``  to see all tracked objects and use metrics for specific object(s) to create custom dashboards and health rules/policies under the  ``Alert & Respond``  menu.

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