GeezerVison is showing github.com — benchmark: add trailing commas in `benchmark/util` · nodejs/node@01cf87a
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: benchmark/.eslintrc.yaml -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -20,7 +20,6 @@ overrides: | 20 | 20 | - path/*.js | 21 | 21 | - process/*.js | 22 | 22 | - url/*.js | 23 | | - - util/*.js | 24 | 23 | rules: | 25 | 24 | comma-dangle: [error, { | 26 | 25 | arrays: always-multiline, | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/util/format.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -19,7 +19,7 @@ const inputs = { | 19 | 19 |
| 20 | 20 | const bench = common.createBenchmark(main, { | 21 | 21 | n: [1e5], | 22 | | - type: Object.keys(inputs) | | 22 | + type: Object.keys(inputs), | 23 | 23 | }); | 24 | 24 |
| 25 | 25 | function main({ n, type }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/util/inspect-array.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, { | 11 | 11 | 'sparseArray', | 12 | 12 | 'mixedArray', | 13 | 13 | 'denseArray_showHidden', | 14 | | - ] | | 14 | + ], | 15 | 15 | }); | 16 | 16 |
| 17 | 17 | function main({ n, len, type }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/util/inspect-proxy.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ const common = require('../common.js'); | 6 | 6 | const bench = common.createBenchmark(main, { | 7 | 7 | n: [1e5], | 8 | 8 | showProxy: [0, 1], | 9 | | - isProxy: [0, 1] | | 9 | + isProxy: [0, 1], | 10 | 10 | }); | 11 | 11 |
| 12 | 12 | function main({ n, showProxy, isProxy }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/util/inspect.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ const common = require('../common.js'); | 6 | 6 | const opts = { | 7 | 7 | showHidden: { showHidden: true }, | 8 | 8 | colors: { colors: true }, | 9 | | - none: undefined | | 9 | + none: undefined, | 10 | 10 | }; | 11 | 11 | const bench = common.createBenchmark(main, { | 12 | 12 | n: [2e4], | @@ -25,7 +25,7 @@ const bench = common.createBenchmark(main, { | 25 | 25 | 'TypedArray_extra', | 26 | 26 | 'Number', | 27 | 27 | ], | 28 | | - option: Object.keys(opts) | | 28 | + option: Object.keys(opts), | 29 | 29 | }); | 30 | 30 |
| 31 | 31 | function benchmark(n, obj, options) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/util/normalize-encoding.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,7 @@ const groupedInputs = { | 9 | 9 | group_upper: ['UTF-8', 'UTF8', 'UCS2', | 10 | 10 | 'UTF16LE', 'BASE64', 'UCS2'], | 11 | 11 | group_uncommon: ['foo'], | 12 | | - group_misc: ['', 'utf16le', 'hex', 'HEX', 'BINARY'] | | 12 | + group_misc: ['', 'utf16le', 'hex', 'HEX', 'BINARY'], | 13 | 13 | }; | 14 | 14 |
| 15 | 15 | const inputs = [ | @@ -21,9 +21,9 @@ const inputs = [ | 21 | 21 |
| 22 | 22 | const bench = common.createBenchmark(main, { | 23 | 23 | input: inputs.concat(Object.keys(groupedInputs)), | 24 | | - n: [1e5] | | 24 | + n: [1e5], | 25 | 25 | }, { | 26 | | - flags: '--expose-internals' | | 26 | + flags: '--expose-internals', | 27 | 27 | }); | 28 | 28 |
| 29 | 29 | function getInput(input) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/util/priority-queue.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 3 | 3 | const common = require('../common'); | 4 | 4 |
| 5 | 5 | const bench = common.createBenchmark(main, { | 6 | | - n: [1e5] | | 6 | + n: [1e5], | 7 | 7 | }, { flags: ['--expose-internals'] }); | 8 | 8 |
| 9 | 9 | function main({ n, type }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/util/text-decoder.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, { | 8 | 8 | fatal: [0, 1], | 9 | 9 | len: [256, 1024 * 16, 1024 * 512], | 10 | 10 | n: [1e2], | 11 | | - type: ['SharedArrayBuffer', 'ArrayBuffer', 'Buffer'] | | 11 | + type: ['SharedArrayBuffer', 'ArrayBuffer', 'Buffer'], | 12 | 12 | }); | 13 | 13 |
| 14 | 14 | function main({ encoding, len, n, ignoreBOM, type, fatal }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/util/text-encoder.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ const bench = common.createBenchmark(main, { | 6 | 6 | len: [16, 32, 256, 1024, 1024 * 32], | 7 | 7 | n: [1e4], | 8 | 8 | type: ['one-byte-string', 'two-byte-string', 'ascii'], | 9 | | - op: ['encode', 'encodeInto'] | | 9 | + op: ['encode', 'encodeInto'], | 10 | 10 | }); | 11 | 11 |
| 12 | 12 | function main({ n, op, len, type }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/util/type-check.js +6-6Lines changed: 6 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,27 +11,27 @@ const args = { | 11 | 11 | ArrayBufferView: { | 12 | 12 | 'true': dataView, | 13 | 13 | 'false-primitive': true, | 14 | | - 'false-object': arrayBuffer | | 14 | + 'false-object': arrayBuffer, | 15 | 15 | }, | 16 | 16 | TypedArray: { | 17 | 17 | 'true': int32Array, | 18 | 18 | 'false-primitive': true, | 19 | | - 'false-object': arrayBuffer | | 19 | + 'false-object': arrayBuffer, | 20 | 20 | }, | 21 | 21 | Uint8Array: { | 22 | 22 | 'true': uint8Array, | 23 | 23 | 'false-primitive': true, | 24 | | - 'false-object': int32Array | 25 | | - } | | 24 | + 'false-object': int32Array, | | 25 | + }, | 26 | 26 | }; | 27 | 27 |
| 28 | 28 | const bench = common.createBenchmark(main, { | 29 | 29 | type: Object.keys(args), | 30 | 30 | version: ['native', 'js'], | 31 | 31 | argument: ['true', 'false-primitive', 'false-object'], | 32 | | - n: [1e5] | | 32 | + n: [1e5], | 33 | 33 | }, { | 34 | | - flags: ['--expose-internals', '--no-warnings'] | | 34 | + flags: ['--expose-internals', '--no-warnings'], | 35 | 35 | }); | 36 | 36 |
| 37 | 37 | function main({ type, argument, version, n }) { | |
|