Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/alexfernandez/pareto-simulator
- Owner: alexfernandez
- License: mit
- Created: 2020-06-09T16:49:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-14T21:23:17.000Z (about 1 year ago)
- Last Synced: 2024-11-24T18:39:01.891Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).