benchmark: add a constant declaration for net
Constant declaration for `net` is omitted in `idle_server.js` Add a constant declaration for constant `net` PR-URL: https://github.com/nodejs/node/pull/3950 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
parent
9429685d48
commit
4126441013
@ -1,12 +1,13 @@
|
|||||||
net = require('net');
|
'use strict';
|
||||||
connections = 0;
|
|
||||||
|
|
||||||
|
const net = require('net');
|
||||||
|
var connections = 0;
|
||||||
var errors = 0;
|
var errors = 0;
|
||||||
|
|
||||||
server = net.Server(function (socket) {
|
var server = net.Server(function (socket) {
|
||||||
|
|
||||||
socket.on('error', function () {
|
socket.on('error', function () {
|
||||||
errors++;
|
errors++;
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -28,4 +29,3 @@ setInterval(function () {
|
|||||||
console.log("SERVER %d errors: %d", process.pid, errors);
|
console.log("SERVER %d errors: %d", process.pid, errors);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user