diff options
Diffstat (limited to 'benchmark/dgram')
-rw-r--r-- | benchmark/dgram/array-vs-concat.js | 4 | ||||
-rw-r--r-- | benchmark/dgram/multi-buffer.js | 6 | ||||
-rw-r--r-- | benchmark/dgram/offset-length.js | 6 | ||||
-rw-r--r-- | benchmark/dgram/single-buffer.js | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/benchmark/dgram/array-vs-concat.js b/benchmark/dgram/array-vs-concat.js index c73c953858..669cf47df4 100644 --- a/benchmark/dgram/array-vs-concat.js +++ b/benchmark/dgram/array-vs-concat.js @@ -43,11 +43,11 @@ function main({ dur, len, num, type, chunks }) { } } - socket.on('listening', function() { + socket.on('listening', () => { bench.start(); onsend(); - setTimeout(function() { + setTimeout(() => { const bytes = sent * len; const gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); diff --git a/benchmark/dgram/multi-buffer.js b/benchmark/dgram/multi-buffer.js index ee74c584e4..a1c50551b8 100644 --- a/benchmark/dgram/multi-buffer.js +++ b/benchmark/dgram/multi-buffer.js @@ -33,11 +33,11 @@ function main({ dur, len, num, type, chunks }) { } } - socket.on('listening', function() { + socket.on('listening', () => { bench.start(); onsend(); - setTimeout(function() { + setTimeout(() => { const bytes = (type === 'send' ? sent : received) * len; const gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); @@ -45,7 +45,7 @@ function main({ dur, len, num, type, chunks }) { }, dur * 1000); }); - socket.on('message', function() { + socket.on('message', () => { received++; }); diff --git a/benchmark/dgram/offset-length.js b/benchmark/dgram/offset-length.js index 7c78765cee..7c672acae2 100644 --- a/benchmark/dgram/offset-length.js +++ b/benchmark/dgram/offset-length.js @@ -29,11 +29,11 @@ function main({ dur, len, num, type }) { } } - socket.on('listening', function() { + socket.on('listening', () => { bench.start(); onsend(); - setTimeout(function() { + setTimeout(() => { const bytes = (type === 'send' ? sent : received) * chunk.length; const gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); @@ -41,7 +41,7 @@ function main({ dur, len, num, type }) { }, dur * 1000); }); - socket.on('message', function() { + socket.on('message', () => { received++; }); diff --git a/benchmark/dgram/single-buffer.js b/benchmark/dgram/single-buffer.js index 0bf650d265..d183b9cd1d 100644 --- a/benchmark/dgram/single-buffer.js +++ b/benchmark/dgram/single-buffer.js @@ -29,11 +29,11 @@ function main({ dur, len, num, type }) { } } - socket.on('listening', function() { + socket.on('listening', () => { bench.start(); onsend(); - setTimeout(function() { + setTimeout(() => { const bytes = (type === 'send' ? sent : received) * chunk.length; const gbits = (bytes * 8) / (1024 * 1024 * 1024); bench.end(gbits); @@ -41,7 +41,7 @@ function main({ dur, len, num, type }) { }, dur * 1000); }); - socket.on('message', function() { + socket.on('message', () => { received++; }); |