1.0.5 • Published 8 years ago

nnb v1.0.5

Weekly downloads
50
License
-
Repository
-
Last release
8 years ago

Native Node.js Benchmark module for stress testing

As you know Node.js has only one thread that doesn't allow to reach high performance in stress HTTP requesting. Nnb uses C++ Posix threads to reach high concurency. The limit for concurrency is on your system, check it ulimit -n

Usage

var Nnb = require('nnb');
var nnb = new MR({
            host: 'google.com',
            path: '/',
            port: 80,
            method: 'GET',
            concurrency: 50,
            headers: {
                'user-agent': 'Mozilla/5.0'
            },
            headersOnly: true
        });
        nnb.go(function (err, result) {
            console.log(result);
        });

Output:

[ { time: 80,
      body: '',
      headers: 'HTTP/1.1 200 OK\r\nDate: Mon, 28 Dec 2015 10:37:35 GMT\r\nConnection: close\r\n\r\n' },
....
]

headersOnly flag is used to avoid getting bytes further from socket right after getting all headers. In most cases that's enough to understand servers respond time and correctness.

Result is array of strings, given by server for each request

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

2.2.2

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

1.0.0

9 years ago