Skip to content

Instantly share code, notes, and snippets.

@indutny
Created November 20, 2012 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indutny/ea7979a2ab35802567bf to your computer and use it in GitHub Desktop.
Save indutny/ea7979a2ab35802567bf to your computer and use it in GitHub Desktop.
var http = require('http'),
request = require('request');
http.Agent.maxSockets = 1000;
var max = 0;
http.createServer(function(req, res) {
var start = +new Date;
request({
method: 'GET',
url: 'http://127.0.0.1:5984/',
}, function(err, response, body) {
var time = +new Date - start;
if (time > max) {
max = time;
console.log(max);
}
res.end('none');
});
}).listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment