Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexfernandez/pareto-simulator

Simulation of request times following a Pareto distribution
https://github.com/alexfernandez/pareto-simulator

Last synced: about 1 month ago
JSON representation

Simulation of request times following a Pareto distribution

Awesome Lists containing this project

README

        

# Pareto Simulator

Simulates a number of incoming requests with response times
following a [Pareto distribution](https://en.wikipedia.org/wiki/Pareto_distribution):
a very simple power law distribution.

## Installation

Run from your console:

```
$ npm install -g pareto-simulator
```

## Usage

Now you can run the Pareto simulator as a command:

```
$ pareto --xm 28
```

To simulate a search on the
[mythical 1000 Google servers](https://www.computerweekly.com/news/2240088495/Single-Google-search-uses-1000-servers):

```
$ pareto --xm 1 -n 1000 --parallel 30 --series 30 --timeout 10 --linear
```

This simulates a request that branches out to 30 * 30 servers.
There are 30 steps, each consisting of 30 parallel invocations.
Each service is designed to take at least 1 millisecond,
with response times following a Pareto distribution,
and with a timeout of 10 ms.
The result is a nice linear graph that approaches a normal distribution.

## Options

Use `--help` to see all the options.

```
The following options are supported:
-a, --alpha Alpha parameter for Pareto ("1.16" by default)
-x, --xm Xm (minimum) for Pareto (required)
-n, --number Number of requests to simulate ("100000" by default)
-t, --timeout Timeout
-p, --parallel Requests in parallel ("1" by default)
-s, --series Consecutive requests ("1" by default)
```

## Acknowledgements

(C) Alex Fernández. Published under the [MIT license](LICENSE).