Sha256: 280fdf14269ccee68a22b11330c92a92186b0de172a15b2e2356eb7804480a7c
Contents?: true
Size: 714 Bytes
Versions: 2
Compression:
Stored size: 714 Bytes
Contents
// // Run ab -c 10 -n 100 localhost:4444/ | wc - l // Nothing is created in http-stress.log // var http = require('http'), path = require('path'), winston = require('../../lib/winston'); var logger = new (winston.Logger)({ transports: [ new (winston.transports.Console)(), new (winston.transports.File)({ filename: path.join(__dirname, '..', 'fixtures', 'logs', 'http-stress.log') }) ] }); var server = http.createServer(function(request, response){ response.writeHead(200, { 'Content-Type': 'text/plain' }); var rd = Math.random() * 500; logger.info("hello " + rd); response.write('hello '); if (Math.floor(rd) == 10) { process.exit(1); } response.end(); }).listen(4444);
Version data entries
2 entries across 2 versions & 1 rubygems