diff --git a/benchmark/.eslintrc.yaml b/benchmark/.eslintrc.yaml index 49c1da33358328..124e493162799a 100644 --- a/benchmark/.eslintrc.yaml +++ b/benchmark/.eslintrc.yaml @@ -9,8 +9,6 @@ rules: overrides: - files: - - buffers/*.js - - buffers-fill/*.js - crypto/*.js - http/*.js - http2/*.js diff --git a/benchmark/buffers/buffer-base64-decode.js b/benchmark/buffers/buffer-base64-decode.js index 6f62a3285dd92e..4a8ed4466df413 100644 --- a/benchmark/buffers/buffer-base64-decode.js +++ b/benchmark/buffers/buffer-base64-decode.js @@ -4,7 +4,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { n: [32], - size: [8 << 20] + size: [8 << 20], }); function main({ n, size }) { diff --git a/benchmark/buffers/buffer-base64-encode.js b/benchmark/buffers/buffer-base64-encode.js index 9837828a353c2d..0571f3181ae4e2 100644 --- a/benchmark/buffers/buffer-base64-encode.js +++ b/benchmark/buffers/buffer-base64-encode.js @@ -24,9 +24,9 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { len: [64 * 1024 * 1024], - n: [32] + n: [32], }, { - test: { len: 256 } + test: { len: 256 }, }); function main({ n, len }) { diff --git a/benchmark/buffers/buffer-bytelength.js b/benchmark/buffers/buffer-bytelength.js index fbbe0f040da56a..0f24df0111342f 100644 --- a/benchmark/buffers/buffer-bytelength.js +++ b/benchmark/buffers/buffer-bytelength.js @@ -4,7 +4,7 @@ const common = require('../common'); const bench = common.createBenchmark(main, { encoding: ['utf8', 'base64', 'buffer'], len: [2, 16, 256], // x16 - n: [4e6] + n: [4e6], }); // 16 chars each diff --git a/benchmark/buffers/buffer-compare-instance-method.js b/benchmark/buffers/buffer-compare-instance-method.js index eb18fa518037f4..27857abc64a4b9 100644 --- a/benchmark/buffers/buffer-compare-instance-method.js +++ b/benchmark/buffers/buffer-compare-instance-method.js @@ -4,7 +4,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { size: [16, 512, 4096, 16386], args: [1, 2, 5], - n: [1e6] + n: [1e6], }); function main({ n, size, args }) { diff --git a/benchmark/buffers/buffer-compare-offset.js b/benchmark/buffers/buffer-compare-offset.js index 50b46864de2453..a927af6673714a 100644 --- a/benchmark/buffers/buffer-compare-offset.js +++ b/benchmark/buffers/buffer-compare-offset.js @@ -4,7 +4,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { method: ['offset', 'slice'], size: [16, 512, 4096, 16386], - n: [1e6] + n: [1e6], }); function compareUsingSlice(b0, b1, len, iter) { diff --git a/benchmark/buffers/buffer-compare.js b/benchmark/buffers/buffer-compare.js index 83ff5ec1d00427..d0debfa0c7c5b9 100644 --- a/benchmark/buffers/buffer-compare.js +++ b/benchmark/buffers/buffer-compare.js @@ -24,7 +24,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { size: [16, 512, 4096, 16386], - n: [1e6] + n: [1e6], }); function main({ n, size }) { diff --git a/benchmark/buffers/buffer-concat-fill.js b/benchmark/buffers/buffer-concat-fill.js index 8fb389fe6c8639..f43e14179ccc15 100644 --- a/benchmark/buffers/buffer-concat-fill.js +++ b/benchmark/buffers/buffer-concat-fill.js @@ -3,7 +3,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { extraSize: [1, 256, 4 * 256], - n: [8e5] + n: [8e5], }); function main({ n, extraSize }) { diff --git a/benchmark/buffers/buffer-concat.js b/benchmark/buffers/buffer-concat.js index 87910d2c8e385a..26edc649d8d349 100644 --- a/benchmark/buffers/buffer-concat.js +++ b/benchmark/buffers/buffer-concat.js @@ -5,7 +5,7 @@ const bench = common.createBenchmark(main, { pieces: [4, 16], pieceSize: [1, 16, 256], withTotalLength: [0, 1], - n: [8e5] + n: [8e5], }); function main({ n, pieces, pieceSize, withTotalLength }) { diff --git a/benchmark/buffers/buffer-copy.js b/benchmark/buffers/buffer-copy.js index 054f72ef41cf7f..a498c08e65276f 100644 --- a/benchmark/buffers/buffer-copy.js +++ b/benchmark/buffers/buffer-copy.js @@ -4,7 +4,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { bytes: [0, 8, 128, 32 * 1024], partial: ['true', 'false'], - n: [6e6] + n: [6e6], }, { combinationFilter: (p) => { return (p.partial === 'false' && p.bytes === 0) || diff --git a/benchmark/buffers/buffer-creation.js b/benchmark/buffers/buffer-creation.js index 862bff4fbabe58..9612c6e9008983 100644 --- a/benchmark/buffers/buffer-creation.js +++ b/benchmark/buffers/buffer-creation.js @@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, { 'slow-allocUnsafe', ], len: [10, 1024, 4096, 8192], - n: [6e5] + n: [6e5], }); function main({ len, n, type }) { diff --git a/benchmark/buffers/buffer-equals.js b/benchmark/buffers/buffer-equals.js index 99d2472bd3a088..a3d0e7005a2a0a 100644 --- a/benchmark/buffers/buffer-equals.js +++ b/benchmark/buffers/buffer-equals.js @@ -4,7 +4,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { size: [0, 512, 16386], difflen: ['true', 'false'], - n: [1e6] + n: [1e6], }); function main({ n, size, difflen }) { diff --git a/benchmark/buffers/buffer-fill.js b/benchmark/buffers/buffer-fill.js index 8d4d4996068224..f1ae896843eee0 100644 --- a/benchmark/buffers/buffer-fill.js +++ b/benchmark/buffers/buffer-fill.js @@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, { 'fill(Buffer.alloc(1), 0)', ], size: [2 ** 13, 2 ** 16], - n: [2e4] + n: [2e4], }); function main({ n, type, size }) { diff --git a/benchmark/buffers/buffer-from.js b/benchmark/buffers/buffer-from.js index d0f7d42f5e4369..3b88fe3893d327 100644 --- a/benchmark/buffers/buffer-from.js +++ b/benchmark/buffers/buffer-from.js @@ -16,7 +16,7 @@ const bench = common.createBenchmark(main, { 'uint16array', ], len: [100, 2048], - n: [8e5] + n: [8e5], }); function main({ len, n, source }) { diff --git a/benchmark/buffers/buffer-hex.js b/benchmark/buffers/buffer-hex.js index 33d2b44d6a5950..6e61d71c9bacf1 100644 --- a/benchmark/buffers/buffer-hex.js +++ b/benchmark/buffers/buffer-hex.js @@ -4,7 +4,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { len: [64, 1024], - n: [1e6] + n: [1e6], }); function main({ len, n }) { diff --git a/benchmark/buffers/buffer-indexof-number.js b/benchmark/buffers/buffer-indexof-number.js index b00a46524fa3de..5d0ecb91d91d67 100644 --- a/benchmark/buffers/buffer-indexof-number.js +++ b/benchmark/buffers/buffer-indexof-number.js @@ -5,12 +5,12 @@ const path = require('path'); const bench = common.createBenchmark(main, { value: ['@'.charCodeAt(0)], - n: [1e6] + n: [1e6], }); function main({ n, value }) { const aliceBuffer = fs.readFileSync( - path.resolve(__dirname, '../fixtures/alice.html') + path.resolve(__dirname, '../fixtures/alice.html'), ); let count = 0; diff --git a/benchmark/buffers/buffer-indexof.js b/benchmark/buffers/buffer-indexof.js index 1b02a8bb7d9d38..52cc95ccb9cf7e 100644 --- a/benchmark/buffers/buffer-indexof.js +++ b/benchmark/buffers/buffer-indexof.js @@ -21,7 +21,7 @@ const bench = common.createBenchmark(main, { search: searchStrings, encoding: ['undefined', 'utf8', 'ucs2'], type: ['buffer', 'string'], - n: [5e4] + n: [5e4], }, { combinationFilter: (p) => { return (p.type === 'buffer' && p.encoding === 'undefined') || @@ -31,7 +31,7 @@ const bench = common.createBenchmark(main, { function main({ n, search, encoding, type }) { let aliceBuffer = fs.readFileSync( - path.resolve(__dirname, '../fixtures/alice.html') + path.resolve(__dirname, '../fixtures/alice.html'), ); if (encoding === 'undefined') { diff --git a/benchmark/buffers/buffer-iterate.js b/benchmark/buffers/buffer-iterate.js index 3e2a897903d435..57a15e42249742 100644 --- a/benchmark/buffers/buffer-iterate.js +++ b/benchmark/buffers/buffer-iterate.js @@ -7,13 +7,13 @@ const bench = common.createBenchmark(main, { size: [512, 4096, 16386], type: ['fast'], method: ['for', 'forOf', 'iterator'], - n: [1e3] + n: [1e3], }); const methods = { 'for': benchFor, 'forOf': benchForOf, - 'iterator': benchIterator + 'iterator': benchIterator, }; function main({ size, type, method, n }) { diff --git a/benchmark/buffers/buffer-normalize-encoding.js b/benchmark/buffers/buffer-normalize-encoding.js index 9cf51fa367eb4f..709063f50bbeb0 100644 --- a/benchmark/buffers/buffer-normalize-encoding.js +++ b/benchmark/buffers/buffer-normalize-encoding.js @@ -22,9 +22,9 @@ const bench = common.createBenchmark(main, { 'utf8', 'UTF8', ], - n: [1e6] + n: [1e6], }, { - flags: ['--expose-internals'] + flags: ['--expose-internals'], }); function main({ encoding, n }) { diff --git a/benchmark/buffers/buffer-read-float.js b/benchmark/buffers/buffer-read-float.js index 656762d1d4f1d0..72d856b436b3c7 100644 --- a/benchmark/buffers/buffer-read-float.js +++ b/benchmark/buffers/buffer-read-float.js @@ -5,7 +5,7 @@ const bench = common.createBenchmark(main, { type: ['Double', 'Float'], endian: ['LE'], value: ['zero', 'big', 'small', 'inf', 'nan'], - n: [1e6] + n: [1e6], }); function main({ n, type, endian, value }) { diff --git a/benchmark/buffers/buffer-read-with-byteLength.js b/benchmark/buffers/buffer-read-with-byteLength.js index c51ab11ae986d7..57e46b8ce4453f 100644 --- a/benchmark/buffers/buffer-read-with-byteLength.js +++ b/benchmark/buffers/buffer-read-with-byteLength.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { buffer: ['fast'], type: types, n: [1e6], - byteLength: [1, 2, 3, 4, 5, 6] + byteLength: [1, 2, 3, 4, 5, 6], }); function main({ n, buf, type, byteLength }) { diff --git a/benchmark/buffers/buffer-read.js b/benchmark/buffers/buffer-read.js index e0ec13992c2fae..f3b2a5645174fe 100644 --- a/benchmark/buffers/buffer-read.js +++ b/benchmark/buffers/buffer-read.js @@ -21,7 +21,7 @@ const types = [ const bench = common.createBenchmark(main, { buffer: ['fast'], type: types, - n: [1e6] + n: [1e6], }); function main({ n, buf, type }) { diff --git a/benchmark/buffers/buffer-slice.js b/benchmark/buffers/buffer-slice.js index dcb18754e8420d..cc6e1a8a1449fc 100644 --- a/benchmark/buffers/buffer-slice.js +++ b/benchmark/buffers/buffer-slice.js @@ -4,7 +4,7 @@ const SlowBuffer = require('buffer').SlowBuffer; const bench = common.createBenchmark(main, { type: ['fast', 'slow', 'subarray'], - n: [1e6] + n: [1e6], }); const buf = Buffer.allocUnsafe(1024); diff --git a/benchmark/buffers/buffer-swap.js b/benchmark/buffers/buffer-swap.js index e43957efbdb095..08a46d5bd1901e 100644 --- a/benchmark/buffers/buffer-swap.js +++ b/benchmark/buffers/buffer-swap.js @@ -6,9 +6,9 @@ const bench = common.createBenchmark(main, { aligned: ['true', 'false'], method: ['swap16', 'swap32', 'swap64'/* , 'htons', 'htonl', 'htonll' */], len: [64, 256, 768, 1024, 2056, 8192], - n: [1e6] + n: [1e6], }, { - test: { len: 16 } + test: { len: 16 }, }); // The htons and htonl methods below are used to benchmark the diff --git a/benchmark/buffers/buffer-tojson.js b/benchmark/buffers/buffer-tojson.js index be6d5fa367b5a3..9cd6883120d4b0 100644 --- a/benchmark/buffers/buffer-tojson.js +++ b/benchmark/buffers/buffer-tojson.js @@ -4,7 +4,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { n: [1e4], - len: [0, 256, 4 * 1024] + len: [0, 256, 4 * 1024], }); function main({ n, len }) { diff --git a/benchmark/buffers/buffer-tostring.js b/benchmark/buffers/buffer-tostring.js index ac4e7f6c86e010..0638dc996b39ac 100644 --- a/benchmark/buffers/buffer-tostring.js +++ b/benchmark/buffers/buffer-tostring.js @@ -6,7 +6,7 @@ const bench = common.createBenchmark(main, { encoding: ['', 'utf8', 'ascii', 'latin1', 'hex', 'UCS-2'], args: [0, 1, 3], len: [1, 64, 1024], - n: [1e6] + n: [1e6], }, { combinationFilter: (p) => { return (p.args === 0 && p.encoding === '') || diff --git a/benchmark/buffers/buffer-write-string.js b/benchmark/buffers/buffer-write-string.js index cd24d379728cda..9d9e8a93391737 100644 --- a/benchmark/buffers/buffer-write-string.js +++ b/benchmark/buffers/buffer-write-string.js @@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, { ], args: [ '', 'offset', 'offset+length' ], len: [2048], - n: [1e6] + n: [1e6], }); function main({ len, n, encoding, args }) { diff --git a/benchmark/buffers/buffer-write.js b/benchmark/buffers/buffer-write.js index 5025dd2bca0407..239abc8a0da69e 100644 --- a/benchmark/buffers/buffer-write.js +++ b/benchmark/buffers/buffer-write.js @@ -29,7 +29,7 @@ const types = [ const bench = common.createBenchmark(main, { buffer: ['fast'], type: types, - n: [1e6] + n: [1e6], }); const INT8 = 0x7f; @@ -60,14 +60,14 @@ const mod = { writeUIntLE: INT8, writeUIntBE: INT16, writeIntLE: INT32, - writeIntBE: INT48 + writeIntBE: INT48, }; const byteLength = { writeUIntLE: 1, writeUIntBE: 2, writeIntLE: 4, - writeIntBE: 6 + writeIntBE: 6, }; function main({ n, buf, type }) { diff --git a/benchmark/buffers/buffer-zero.js b/benchmark/buffers/buffer-zero.js index 81b9731c0a213e..1acd21100dd1a9 100644 --- a/benchmark/buffers/buffer-zero.js +++ b/benchmark/buffers/buffer-zero.js @@ -4,7 +4,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { n: [1e6], - type: ['buffer', 'string'] + type: ['buffer', 'string'], }); const zeroBuffer = Buffer.alloc(0); diff --git a/benchmark/buffers/dataview-set.js b/benchmark/buffers/dataview-set.js index b7914fe45f175b..ff0eabd1cdfe3a 100644 --- a/benchmark/buffers/dataview-set.js +++ b/benchmark/buffers/dataview-set.js @@ -20,7 +20,7 @@ const types = [ const bench = common.createBenchmark(main, { type: types, - n: [1e6] + n: [1e6], }); const INT8 = 0x7f; @@ -36,7 +36,7 @@ const mod = { setInt32: INT32, setUint8: UINT8, setUint16: UINT16, - setUint32: UINT32 + setUint32: UINT32, }; function main({ n, type }) {