node-wrk
Prepare command line arguments and parse the output of the wrk load testing tool
example
var wrk = ;var conns = 1;var results = ;{if conns === 100return console;conns++;;};
Options:
threads
connections
duration
printLatency
headers
: object with additional request headersurl
: target urlpath
: path to wrk binary (default is "wrk")debug
: print the output ofwrk
to stdoutexecOptions
: options that will be directly passed through to thechild_process.exec
of wrk
Callback parameters: (err, wrkResults)
wrkResults always has:
- transferPerSec
- requestsPerSec
- requestsTotal
- durationActual
- transferTotal
- latencyAvg
- latencyStdev
- latencyStdevPerc
- latencyMax
- rpsAvg
- rpsMax
- rpsStdev
- rpsStdevPerc
Has these if printLatency
is enabled
- latency50
- latency75
- latency90
- latency99
And sometimes has (only if they exist):
- connectErrors
- readErrors
- writeErrors
- timeoutErrors
- non2xx3xx
install
With npm do:
npm install wrk
see also
license
MIT