summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2023-02-04 19:19:36 +0100
committerGitHub <noreply@github.com>2023-02-04 18:19:36 +0000
commit806a516851f906c6cf0ca7b45dbcf499855b4c54 (patch)
tree1df0121b32e87afb0f24afb820bc9265e0343165 /benchmark
parent95434fbf28bbb9d2221eddaedad8420b5dfb3877 (diff)
downloadnode-new-806a516851f906c6cf0ca7b45dbcf499855b4c54.tar.gz
benchmark: add trailing commas in `benchmark/misc`
PR-URL: https://github.com/nodejs/node/pull/46474 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/.eslintrc.yaml1
-rw-r--r--benchmark/misc/arguments.js2
-rw-r--r--benchmark/misc/freelist.js4
-rw-r--r--benchmark/misc/getstringwidth.js6
-rw-r--r--benchmark/misc/hidestackframes.js4
-rw-r--r--benchmark/misc/object-property-bench.js2
-rw-r--r--benchmark/misc/print.js4
-rw-r--r--benchmark/misc/punycode.js2
-rw-r--r--benchmark/misc/trace.js8
-rw-r--r--benchmark/misc/util-extend-vs-object-assign.js2
10 files changed, 17 insertions, 18 deletions
diff --git a/benchmark/.eslintrc.yaml b/benchmark/.eslintrc.yaml
index 814c1c621b..9370ad5693 100644
--- a/benchmark/.eslintrc.yaml
+++ b/benchmark/.eslintrc.yaml
@@ -12,7 +12,6 @@ overrides:
- crypto/*.js
- http/*.js
- http2/*.js
- - misc/*.js
- path/*.js
- process/*.js
- url/*.js
diff --git a/benchmark/misc/arguments.js b/benchmark/misc/arguments.js
index 39f4020b1a..eb63d2e5bd 100644
--- a/benchmark/misc/arguments.js
+++ b/benchmark/misc/arguments.js
@@ -12,7 +12,7 @@ const methods = [
const bench = createBenchmark(main, {
method: methods,
- n: [1e6]
+ n: [1e6],
});
function usingRestAndSpread(...args) {
diff --git a/benchmark/misc/freelist.js b/benchmark/misc/freelist.js
index d03c3674fd..d0d4a033cf 100644
--- a/benchmark/misc/freelist.js
+++ b/benchmark/misc/freelist.js
@@ -3,9 +3,9 @@
const common = require('../common.js');
const bench = common.createBenchmark(main, {
- n: [100000]
+ n: [100000],
}, {
- flags: ['--expose-internals']
+ flags: ['--expose-internals'],
});
function main({ n }) {
diff --git a/benchmark/misc/getstringwidth.js b/benchmark/misc/getstringwidth.js
index 9dd4b47df7..3ab563ffc3 100644
--- a/benchmark/misc/getstringwidth.js
+++ b/benchmark/misc/getstringwidth.js
@@ -4,9 +4,9 @@ const common = require('../common.js');
const bench = common.createBenchmark(main, {
type: ['ascii', 'mixed', 'emojiseq', 'fullwidth'],
- n: [10e4]
+ n: [10e4],
}, {
- flags: ['--expose-internals']
+ flags: ['--expose-internals'],
});
function main({ n, type }) {
@@ -16,7 +16,7 @@ function main({ n, type }) {
ascii: 'foobar'.repeat(100),
mixed: 'foo'.repeat(100) + '๐Ÿ˜€' + 'bar'.repeat(100),
emojiseq: '๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ'.repeat(10),
- fullwidth: 'ไฝ ๅฅฝ'.repeat(150)
+ fullwidth: 'ไฝ ๅฅฝ'.repeat(150),
})[type];
bench.start();
diff --git a/benchmark/misc/hidestackframes.js b/benchmark/misc/hidestackframes.js
index 5b14f2d95b..b28be725a3 100644
--- a/benchmark/misc/hidestackframes.js
+++ b/benchmark/misc/hidestackframes.js
@@ -5,9 +5,9 @@ const common = require('../common.js');
const bench = common.createBenchmark(main, {
type: ['hide-stackframes-throw', 'direct-call-throw',
'hide-stackframes-noerr', 'direct-call-noerr'],
- n: [10e4]
+ n: [10e4],
}, {
- flags: ['--expose-internals']
+ flags: ['--expose-internals'],
});
function main({ n, type }) {
diff --git a/benchmark/misc/object-property-bench.js b/benchmark/misc/object-property-bench.js
index 9b33ac9a63..acdaddca2c 100644
--- a/benchmark/misc/object-property-bench.js
+++ b/benchmark/misc/object-property-bench.js
@@ -6,7 +6,7 @@ const common = require('../common.js');
const bench = common.createBenchmark(main, {
method: ['property', 'string', 'variable', 'symbol'],
- n: [1e9]
+ n: [1e9],
});
function runProperty(n) {
diff --git a/benchmark/misc/print.js b/benchmark/misc/print.js
index e048d22f7b..55afd44c03 100644
--- a/benchmark/misc/print.js
+++ b/benchmark/misc/print.js
@@ -4,7 +4,7 @@ const { spawn } = require('child_process');
const bench = common.createBenchmark(main, {
dur: [1],
- code: ['1', '"string"', 'process.versions', 'process']
+ code: ['1', '"string"', 'process.versions', 'process'],
});
function spawnProcess(code) {
@@ -47,7 +47,7 @@ function start(state, code, bench, getNode) {
function main({ dur, code }) {
const state = {
go: true,
- throughput: 0
+ throughput: 0,
};
setTimeout(() => {
diff --git a/benchmark/misc/punycode.js b/benchmark/misc/punycode.js
index d0ee938ebd..a4fda4168d 100644
--- a/benchmark/misc/punycode.js
+++ b/benchmark/misc/punycode.js
@@ -35,7 +35,7 @@ const bench = common.createBenchmark(main, {
'ืื™ืงื•ืดื.ื™ืฉืจืืœ.museum',
'ๆ—ฅๆœฌ.icom.museum',
'ุงู„ุฃุฑุฏู†.icom.museum',
- ]
+ ],
});
function usingPunycode(val) {
diff --git a/benchmark/misc/trace.js b/benchmark/misc/trace.js
index 8620e99329..f308232804 100644
--- a/benchmark/misc/trace.js
+++ b/benchmark/misc/trace.js
@@ -4,17 +4,17 @@ const common = require('../common.js');
const bench = common.createBenchmark(main, {
n: [100000],
- method: ['trace', 'isTraceCategoryEnabled']
+ method: ['trace', 'isTraceCategoryEnabled'],
}, {
flags: [
'--expose-internals',
'--no-warnings',
'--trace-event-categories', 'foo',
- ]
+ ],
});
const {
- TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN: kBeforeEvent
+ TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN: kBeforeEvent,
} = common.binding('constants').trace;
function doTrace(n, trace) {
@@ -37,7 +37,7 @@ function doIsTraceCategoryEnabled(n, isTraceCategoryEnabled) {
function main({ n, method }) {
const {
trace,
- isTraceCategoryEnabled
+ isTraceCategoryEnabled,
} = common.binding('trace_events');
switch (method) {
diff --git a/benchmark/misc/util-extend-vs-object-assign.js b/benchmark/misc/util-extend-vs-object-assign.js
index 83aec7b9c8..e2ac0a5417 100644
--- a/benchmark/misc/util-extend-vs-object-assign.js
+++ b/benchmark/misc/util-extend-vs-object-assign.js
@@ -5,7 +5,7 @@ const util = require('util');
const bench = common.createBenchmark(main, {
type: ['extend', 'assign'],
- n: [10e4]
+ n: [10e4],
});
function main({ n, type }) {