diff options
Diffstat (limited to 'benchmark/idle_server.js')
-rw-r--r-- | benchmark/idle_server.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/benchmark/idle_server.js b/benchmark/idle_server.js index 805c988811..78e496690d 100644 --- a/benchmark/idle_server.js +++ b/benchmark/idle_server.js @@ -1,12 +1,11 @@ 'use strict'; const net = require('net'); -var connections = 0; var errors = 0; -var server = net.Server(function (socket) { +var server = net.Server(function(socket) { - socket.on('error', function () { + socket.on('error', function() { errors++; }); @@ -18,14 +17,14 @@ server.listen(9000); var oldConnections, oldErrors; -setInterval(function () { +setInterval(function() { if (oldConnections != server.connections) { oldConnections = server.connections; - console.log("SERVER %d connections: %d", process.pid, server.connections); + console.log('SERVER %d connections: %d', process.pid, server.connections); } if (oldErrors != errors) { oldErrors = errors; - console.log("SERVER %d errors: %d", process.pid, errors); + console.log('SERVER %d errors: %d', process.pid, errors); } }, 1000); |