0.0.1 • Published 10 years ago
node-wrk v0.0.1
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:
threadsconnectionsdurationin secondsbaseUrlwhich would be your server's base URLluaScriptwhich is the LUA script file that contains your benchmark
Returns:
errif an error occursoutputthewrkresults 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.
0.0.1
10 years ago