0.10.1 • Published 3 years ago

@dazn/chaos-squirrel-attack-memory-background v0.10.1

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

@dazn/chaos-squirrel-attack-memory-background

Use lots of memory in a forked process. This will apply memory pressure to your service, without impacting garbage collection or risking the process being killed.

Usage

Basic memory attack.

import BackgroundMemoryAttack from '@dazn/chaos-squirrel-attack-memory-background';

const createBackgroundMemoryAttack = BackgroundMemoryAttack.configure({
  size: 2e9 // ~2gb
});

const backgroundMemoryAttack = createBackgroundMemoryAttack();
backgroundMemoryAttack.start();

// ~2gb of memory will be used in a forked process

backgroundMemoryAttack.stop(); // kills the process

Progressive memory attack.

import BackgroundMemoryAttack from '@dazn/chaos-squirrel-attack-memory-background';

const createBackgroundMemoryAttack = BackgroundMemoryAttack.configure({
  size: 2e9 // ~2gb
  stepSize: 2e8, // ~200mb
  stepTime: 1e3 // 1s
});

const backgroundMemoryAttack = createBackgroundMemoryAttack();
backgroundMemoryAttack.start();

// ~2gb of memory will be used in forked processes, starting from 0gb & increasing by ~200mb every 1s

backgroundMemoryAttack.stop(); // kills the processes
0.10.1

3 years ago

0.10.0

3 years ago

0.9.9

3 years ago

0.9.8

3 years ago

0.9.7

3 years ago

0.9.5

3 years ago

0.9.4

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago