@@ -18,12 +18,12 @@ const bench = common.createBenchmark(main, {
1818
1919function main({ dur, len, num, type, chunks }) {
2020 const chunk = [];
21- for (var i = 0; i < chunks; i++) {
21+ for (let i = 0; i < chunks; i++) {
2222 chunk.push(Buffer.allocUnsafe(Math.round(len / chunks)));
2323 }
2424
2525 // Server
26- var sent = 0;
26+ let sent = 0;
2727 const socket = dgram.createSocket('udp4');
2828 const onsend = type === 'concat' ? onsendConcat : onsendMulti;
2929
@@ -32,7 +32,7 @@ function main({ dur, len, num, type, chunks }) {
3232 // The setImmediate() is necessary to have event loop progress on OSes
3333 // that only perform synchronous I/O on nonblocking UDP sockets.
3434 setImmediate(() => {
35- for (var i = 0; i < num; i++) {
35+ for (let i = 0; i < num; i++) {
3636 socket.send(Buffer.concat(chunk), PORT, '127.0.0.1', onsend);
3737 }
3838 });
@@ -44,7 +44,7 @@ function main({ dur, len, num, type, chunks }) {
4444 // The setImmediate() is necessary to have event loop progress on OSes
4545 // that only perform synchronous I/O on nonblocking UDP sockets.
4646 setImmediate(() => {
47- for (var i = 0; i < num; i++) {
47+ for (let i = 0; i < num; i++) {
4848 socket.send(chunk, PORT, '127.0.0.1', onsend);
4949 }
5050 });
0 commit comments