Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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

Package Overview
Dependencies
Maintainers
7
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Chaos Squirrel attack to fill memory in a background process

  • 0.10.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

@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

FAQs

Package last updated on 20 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc