Skip to content

Node wrapper for wrk. Executes wrk command and parses its output to your Node application.

License

Notifications You must be signed in to change notification settings

vjcagay/node-wrk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-wrk

npm install node-wrk

Node wrapper for wrk. Executes wrk command and parses its output to your Node application.

Usage example

var Wrk = require( 'node-wrk' );

var testConfig = {
   'threads'     : 100,
   'connections' : 100,
   'duration'    : 5,
   'baseUrl'     : 'http://localhost:4000',
   'luaScript'   : './test.lua'
};

var wrk = new Wrk( testConfig );

wrk.runBenchmark( function ( err, output ) {
    console.log( output );
} );

Required parameters:

  • threads
  • connections
  • duration in seconds
  • baseUrl which would be your server's base URL
  • luaScript which is the LUA script file that contains your benchmark

Returns:

  • err if an error occurs
  • output the wrk results after a successful benchmark

Important

Make sure wrk is installed in your host machine and is accessible globally. You can grab and compile it from source code.

About

Node wrapper for wrk. Executes wrk command and parses its output to your Node application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published