# requestmob

> Network Request Mob - load generation tool

Latest version **0.1.5** (published 2018-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install requestmob
pnpm add requestmob
yarn add requestmob
bun add requestmob
```

Provides the command `requestmob`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2018-03-31 |
| First published | 2018-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 295.4 KB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Carlos Justiniano |
| Maintainers | cjus |
| Keywords | http, websocket, loadtest, tool |

## Links

- npm: https://www.npmjs.com/package/requestmob
- Repository: https://github.com/cjus/requestmob
- Homepage: https://github.com/cjus/requestmob#readme
- Issues: https://github.com/cjus/requestmob/issues
- npm.io page: https://npm.io/package/requestmob

## Dependencies (3)

- [ws](https://npm.io/package/ws.md) 5.0.0
- [uuid](https://npm.io/package/uuid.md) 3.2.1
- [bluebird](https://npm.io/package/bluebird.md) 3.5.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2018-03-31
- 0.1.0 — 2018-03-15

## README

# Request Mob
The angry mob load generation tool

![](./mob.png)

Request Mob is a load generation / testing tool. As a command line tool it will execute test scripts (called actors) on every CPU core on the machine it runs on.
A mob "actor" is a script which who represent a particular type of network client. That client might be an HTTP or WebSocket client or both if you wish.

You execute request mob by first specfiying the duration of the test in seconds.  The parameters that follow indicate the name of the actors you'd like to execute during the test duration.

For example, here we execute an actor call `hydra.health`:

```shell
$ node requestMob 10 hydra.health
```

## Building custom actors

An actor is a node script which sits inside of the actors subdirectory and which derives from the actor.js base class.

Each actor script requires a class with two functions: 1) constructor() 2) execute(). Actors also require a configuration entry in the config.json file.

```js
{
  "hmr.http.relay": {
    "description": "Call HMR HTTP relay endpoint",
    "host": "localhost",
    "port": 5353
  },
  "hmr.ws.relay": {
    "description": "Call HMR websocket relay endpoint",
    "wsTarget": "ws://localhost:5353"
  },
  "hmr.ws.relay.c100.d60": {
    "description": "Call HMR websocket repay endpoint using 100 clients for 60 seconds",
    "wsTarget": "ws://localhost:5353"
  },
  "hydra.health": {
    "description": "Call Hydra Health endpoint",
    "host": "localhost",
    "port": 5353
  }
}
```

A config entry consist of a named branch - using the name of the actor script (minus the .js extension) and an object containing a description and any other keys the actor requires.

## Running from a docker container

This repo includes a `reqestmob` shell script which you can copy to /usr/bin/local or execute directly.

Make sure that the directory where you execute the requestmob command contains an `actors` subdirectory with your test scripts.

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