script:
$ cat server.js
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200);
res.write('hello world!');
res.end();
}).listen(1334);
before:
$ ~/git/node/tools/wrk/wrk -d30 http://localhost:1334/
Running 30s test @ http://localhost:1334/
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.04ms 472.50us 7.74ms 87.76%
Req/Sec 5.18k 0.90k 7.11k 65.22%
293083 requests in 30.00s, 36.34MB read
Requests/sec: 9769.57
Transfer/sec: 1.21MB
after:
$ ~/git/node/tools/wrk/wrk -d30 http://localhost:1334/
Running 30s test @ http://localhost:1334/
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.00ms 461.37us 10.04ms 87.28%
Req/Sec 5.34k 0.99k 7.67k 65.03%
303840 requests in 29.99s, 37.67MB read
Requests/sec: 10129.74
Transfer/sec: 1.26MB