KO
|
EN
gitlite — search
Search
#react
#cli
#python
#javascript
#php
#android
#docker
#rust
#docker-image
#nodejs
#typescript
#go
node-wrk
★ 83
Open GitHub ↗
wrk load testing tool node wrapper
Download README (.md)
Explore Similar Repositories
T3000_Building_Automation_System
:
Bacnet Modbus building automation front end
srt
:
SRT stands for SubRip text file format, which is a file for storing subtitles. This is a Ruby library for manipulating SRT files.
mastodon
:
Mastodon – a large-scale tracking and track-editing framework for large, multi-view images.
lambda-chop
:
Sweet.js macros for lambdas with currying, bound functions, and placeholders.
colResize
:
A DataTables plugin for dynamic resizing of columns
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
node-wrk
?
Download (.md)
# node-wrk Prepare command line arguments and parse the output of the [wrk](https://github.com/wg/wrk) load testing tool # example ``` js var wrk = require('wrk'); var conns = 1; var results = []; function benchmark() { if (conns === 100) { return console.log(results); } conns++; wrk({ threads: 1, connections: conns, duration: '10s', printLatency: true, headers: { cookie: 'JSESSIONID=abcd' }, url: 'http://localhost:3000/' }, function(err, out) { results.push(out); benchmark(); }); } benchmark(); ``` Options: - `threads` - `connections` - `duration` - `printLatency` - `headers`: object with additional request headers - `url`: target url - `path`: path to wrk binary (default is "wrk") - `debug`: print the output of `wrk` to stdout - `execOptions`: options that will be directly passed through to the `child_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](https://npmjs.org) do: ``` npm install wrk ``` # see also [HTTPerf.js](https://github.com/jmervine/httperfjs) # license MIT