loadtest 6.3.0 → 6.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,3 @@
1
- [![Build Status](https://secure.travis-ci.org/alexfernandez/loadtest.svg)](http://travis-ci.org/alexfernandez/loadtest)
2
1
  [![run on repl.it](http://repl.it/badge/github/alexfernandez/loadtest)](https://repl.it/github/alexfernandez/loadtest)
3
2
 
4
3
  [![NPM](https://nodei.co/npm/loadtest.png?downloads=true)](https://nodei.co/npm/loadtest/)
package/lib/testserver.js CHANGED
@@ -106,6 +106,11 @@ class TestServer {
106
106
  request.on('data', data => {
107
107
  request.body += data.toString();
108
108
  });
109
+ request.on('error', () => {
110
+ // ignore request
111
+ response.end()
112
+ this.latency.end(id, -1);
113
+ })
109
114
  request.on('end', () => {
110
115
  this.totalRequests += 1
111
116
  const elapsedMs = Date.now() - this.debuggedTime
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loadtest",
3
- "version": "6.3.0",
3
+ "version": "6.3.1",
4
4
  "type": "module",
5
5
  "description": "Run load tests for your web application. Mostly ab-compatible interface, with an option to force requests per second. Includes an API for automated load testing.",
6
6
  "homepage": "https://github.com/alexfernandez/loadtest",
package/cluster-error.js DELETED
@@ -1,17 +0,0 @@
1
- process.env.NODE_CLUSTER_SCHED_POLICY = 'none'
2
-
3
- const cluster = await import('cluster')
4
- console.log(cluster)
5
- //import * as cluster from 'cluster'
6
-
7
- if (cluster.isPrimary) {
8
- console.log(`process.env.NODE_CLUSTER_SCHED_POLICY: ${process.env.NODE_CLUSTER_SCHED_POLICY}`)
9
- for (let index = 0; index < 2; index++) {
10
- cluster.fork()
11
- setTimeout(() => console.log(`cluster.schedulingPolicy: ${cluster.schedulingPolicy}`), 1000)
12
- }
13
- } else {
14
- setTimeout(() => null, 1000)
15
- }
16
-
17
-
package/cluster-works.cjs DELETED
@@ -1,17 +0,0 @@
1
- process.env.NODE_CLUSTER_SCHED_POLICY = 'none'
2
-
3
- const cluster = require('cluster')
4
- console.log(cluster)
5
- //import * as cluster from 'cluster'
6
-
7
- if (cluster.isPrimary) {
8
- console.log(`process.env.NODE_CLUSTER_SCHED_POLICY: ${process.env.NODE_CLUSTER_SCHED_POLICY}`)
9
- for (let index = 0; index < 2; index++) {
10
- cluster.fork()
11
- setTimeout(() => console.log(`cluster.schedulingPolicy: ${cluster.schedulingPolicy}`), 1000)
12
- }
13
- } else {
14
- setTimeout(() => null, 1000)
15
- }
16
-
17
-