Comparing version 1.1.0 to 1.2.0
@@ -0,0 +0,0 @@ var wrk = require('../index.js'); |
21
index.js
@@ -28,8 +28,11 @@ var exec = require('child_process').exec; | ||
// the caller may have requested that we pass options to the exec | ||
const { execOptions={} } = opts | ||
cmd += ' ' + opts.url; | ||
var child = exec(cmd, function(error, stdout, stderr) { | ||
opts.debug && console.log(cmd); | ||
var child = exec(cmd, execOptions, function(error, stdout, stderr) { | ||
if (opts.debug) { | ||
console.log('stdout:\n', stdout); | ||
console.log('stderr:\n', stderr); | ||
stdout && console.log(stdout); | ||
stderr && console.error(stderr); | ||
} | ||
@@ -42,12 +45,2 @@ if (error) { | ||
}); | ||
child.on('close', function(code, signal) { | ||
if (code === null) { | ||
return callback(new Error('killed by signal: %s', signal)); | ||
} | ||
if (code !== 0) { | ||
return callback(new Error('died with exit code: %s', code)); | ||
} | ||
}); | ||
} | ||
@@ -54,0 +47,0 @@ |
@@ -0,0 +0,0 @@ module.exports = parseWrk |
{ | ||
"name": "wrk", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "wrk load test tool wrapper and output parser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,2 +24,3 @@ # node-wrk | ||
printLatency: true, | ||
headers: { cookie: 'JSESSIONID=abcd' }, | ||
url: 'http://localhost:3000/' | ||
@@ -39,2 +40,3 @@ }, function(err, out) { | ||
- `printLatency` | ||
- `headers`: object with additional request headers | ||
- `url`: target url | ||
@@ -41,0 +43,0 @@ - `path`: path to wrk binary (default is "wrk") |
@@ -0,0 +0,0 @@ var test = require('tap').test; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11547
88
245