Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark: add trailing commas in benchmark/misc #46474

Merged
merged 1 commit into from Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion benchmark/.eslintrc.yaml
Expand Up @@ -14,7 +14,6 @@ overrides:
- crypto/*.js
- http/*.js
- http2/*.js
- misc/*.js
- path/*.js
- process/*.js
- url/*.js
Expand Down
2 changes: 1 addition & 1 deletion benchmark/misc/arguments.js
Expand Up @@ -12,7 +12,7 @@ const methods = [

const bench = createBenchmark(main, {
method: methods,
n: [1e6]
n: [1e6],
});

function usingRestAndSpread(...args) {
Expand Down
4 changes: 2 additions & 2 deletions benchmark/misc/freelist.js
Expand Up @@ -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 }) {
Expand Down
6 changes: 3 additions & 3 deletions benchmark/misc/getstringwidth.js
Expand Up @@ -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 }) {
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions benchmark/misc/hidestackframes.js
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/misc/object-property-bench.js
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions benchmark/misc/print.js
Expand Up @@ -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) {
Expand Down Expand Up @@ -47,7 +47,7 @@ function start(state, code, bench, getNode) {
function main({ dur, code }) {
const state = {
go: true,
throughput: 0
throughput: 0,
};

setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/misc/punycode.js
Expand Up @@ -35,7 +35,7 @@ const bench = common.createBenchmark(main, {
'איקו״ם.ישראל.museum',
'日本.icom.museum',
'الأردن.icom.museum',
]
],
});

function usingPunycode(val) {
Expand Down
8 changes: 4 additions & 4 deletions benchmark/misc/trace.js
Expand Up @@ -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) {
Expand All @@ -37,7 +37,7 @@ function doIsTraceCategoryEnabled(n, isTraceCategoryEnabled) {
function main({ n, method }) {
const {
trace,
isTraceCategoryEnabled
isTraceCategoryEnabled,
} = common.binding('trace_events');

switch (method) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/misc/util-extend-vs-object-assign.js
Expand Up @@ -5,7 +5,7 @@ const util = require('util');

const bench = common.createBenchmark(main, {
type: ['extend', 'assign'],
n: [10e4]
n: [10e4],
});

function main({ n, type }) {
Expand Down