Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flesler/stress-node
Stress test library for Node JS
https://github.com/flesler/stress-node
Last synced: 23 days ago
JSON representation
Stress test library for Node JS
- Host: GitHub
- URL: https://github.com/flesler/stress-node
- Owner: flesler
- License: mit
- Created: 2013-12-08T15:37:19.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-09T16:22:05.000Z (almost 11 years ago)
- Last Synced: 2024-08-09T19:22:59.023Z (3 months ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
stress-node
===========## Description
Stress test library for Node JS
## Installation
Using npm:
$ npm install stress-node
## Usage example
```js
var stress = require('stress-node');
stress({
url: 'http://google.com',
method: 'GET',
amount: 1000,
concurrent: 5,
data: null,
progress: function(report) {
}
}, function(report) {
});
```## The report object
Both functions will receive a report object that looks like this:
```js
{
url: 'http://google.com',
ok: 990,
fail: 5,
completed: 995,
ongoing: 4,
pending: 1,
total: 1000,
start: [object Date],
end: [object Date],
responses: [
{ status:200, amount: 990 }
],
errors: [
{ code: 'ECONNREFUSED', amount: 4 },
{ code: 404, amount: 1 }
]
}
```# Stress server
I also made a CLI server that runs a stress test using this library.
Go check it out at https://github.com/flesler/stress-node-server.
# TODOs
- `timeout` setting doesn't seem to be working correctly