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: increase iteration number to appropriate one #50861

Closed
wants to merge 79 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
4207129
benchmark: increase iteration number to appropriate one
Nov 23, 2023
d99642a
benchmark: increase get-ciphers iteration number to appropriate one
Nov 23, 2023
186fe2c
build: disable flag v8_scriptormodule_legacy_lifetime
legendecas Nov 17, 2023
366d727
permission: mark const functions as such
tniessen Nov 17, 2023
eecb717
doc: update print results(detail) in `PerformanceEntry`
Nov 17, 2023
377c28d
test: give more time to GC in test-shadow-realm-gc-*
joyeecheung Nov 14, 2023
1108a98
test: mark SEA tests as flaky on PowerPC
joyeecheung Nov 15, 2023
9cb0148
build: fix GN configuration for deps/base64
zcbenz Nov 17, 2023
c4032f2
test: skip parallel/test-macos-app-sandbox if disk space < 120MB
joyeecheung Nov 17, 2023
1e72c91
test: improve test-bootstrap-modules.js
joyeecheung Nov 17, 2023
dfde215
perf_hooks: implement performance.now() with fast API calls
joyeecheung Nov 17, 2023
6db3c64
benchmark: rewrite import.meta benchmark
joyeecheung Nov 18, 2023
6304f7c
deps: update simdutf to 4.0.4
nodejs-github-bot Nov 18, 2023
e83baa6
doc: fix fs.writeFileSync return value documentation
RyanZim Nov 18, 2023
0169a09
test: replace forEach() with for-loop
jabro86 Nov 18, 2023
a9fa824
benchmark: increase the iteration number to an appropriate value
Nov 19, 2023
426ca12
stream: add Symbol.toStringTag to Compression Streams
panva Nov 13, 2023
d899d5e
stream: yield expected Error class on zlib errors
panva Nov 13, 2023
cbdf5a6
test: update WPT files for WebIDL tests
panva Nov 13, 2023
4831f25
src: remove erroneous default argument in RadixTree
tniessen Nov 19, 2023
c801888
src: avoid copying strings in FSPermission::Apply
tniessen Nov 19, 2023
30415df
test: replace forEach in whatwg-encoding-custom-interop
HonzaMac Nov 19, 2023
be26f4d
src: iterate on import attributes array correctly
targos Nov 19, 2023
a1cb897
inspector: use private fields instead of symbols
anonrig Nov 19, 2023
a5cafc5
build: add configuration flag to enable Maglev
kvakil Nov 12, 2023
3384dfd
test: enable idlharness tests for encoding
MattiasBuelens Nov 20, 2023
8eafec3
doc: update Crypto API doc for x509.keyUsage
DMeechan Nov 20, 2023
e91566f
deps: V8: cherry-pick 475c8cdf9a95
kvakil Nov 12, 2023
f4da4ab
src: add IsolateScopes before using isolates
kvakil Nov 12, 2023
7131119
test: use ppc and ppc64 to skip SEA tests on PowerPC
joyeecheung Nov 21, 2023
696bfc4
deps: update minimatch to 9.0.3
nodejs-github-bot Nov 21, 2023
f236e17
tools: update lint-md-dependencies to [email protected]
nodejs-github-bot Nov 21, 2023
f947592
tools: update eslint to 8.54.0
nodejs-github-bot Nov 21, 2023
478d646
test: use requires instead of flaky in console WPT status
panva Nov 21, 2023
d6a85d2
deps: update undici to 5.27.2
nodejs-github-bot Nov 21, 2023
8735574
net: check pipe mode and path
theanarkh Nov 21, 2023
46c6e06
test: replace forEach() with for ... of in test-tls-getprotocol.js
SociableSteve Nov 21, 2023
ecc8936
test: replace forEach with for-of in test-url-relative
vitosorriso Nov 21, 2023
5fc7bed
stream: fix enumerability of ReadableStream.prototype.values
MattiasBuelens Nov 17, 2023
9266d1c
stream: fix enumerability of ReadableStream.from
MattiasBuelens Nov 20, 2023
c21e806
test: add note about readable streams with type owning
MattiasBuelens Nov 17, 2023
042ea75
test: add note about unresolved spec issue
MattiasBuelens Nov 18, 2023
7793773
deps: update ada to 2.7.4
nodejs-github-bot Nov 21, 2023
61234ce
src: add `--disable-warning` option
Nov 21, 2023
9d9c9b4
crypto: update root certificates to NSS 3.95
nodejs-github-bot Nov 21, 2023
9af0fb0
dns: call handle.setServers() with a valid array
lpinca Nov 21, 2023
354eb49
deps: update icu to 74.1
nodejs-github-bot Nov 1, 2023
a653bde
build: add GN configurations for simdjson
zcbenz Nov 21, 2023
802c11d
doc: fix typos in --allow-fs-*
tniessen Nov 22, 2023
3c46275
doc: add CanadaHonk to triagers
CanadaHonk Nov 21, 2023
e36ce82
2023-11-22, Version 20.10.0 'Iron' (LTS)
targos Nov 12, 2023
0ad7229
src: fix compatility with upcoming V8 12.1 APIs
zcbenz Nov 22, 2023
73e71ed
tools: use macOS keychain to notarize the releases
UlisesGascon Nov 13, 2023
38f3754
doc: create deprecation code for isWebAssemblyCompiledModule
marco-ippolito Nov 22, 2023
2d550a2
permission: do not create symlinks if target is relative
tniessen Nov 22, 2023
19ac425
doc: get rid of unnecessary `eslint-skip` comments
aduh95 Nov 22, 2023
154b8de
fs: improve error perf of sync `lstat`+`fstat`
CanadaHonk Nov 23, 2023
f2d4b88
doc: shard not supported with watch mode
pulkit-30 Nov 23, 2023
4a3ce61
test: replace foreach with for in test-https-simple.js
Nov 23, 2023
8b61c75
tools: add macOS notarization verification step
UlisesGascon Nov 21, 2023
ccd5bee
fs: replace deprecated `path._makeLong` in copyFile
CanadaHonk Nov 23, 2023
4e92c1c
deps: V8: cherry-pick 0f9ebbc672c7
legendecas Nov 24, 2023
247915b
test: replace forEach to for at test-webcrypto-sign-verify-ecdsa.js
StiffWriter00 Nov 24, 2023
6d4439a
test: replace forEach with for of
RBrNx Nov 24, 2023
5ecfb5c
test: fix dns test case failures after c-ares update to 1.21.0+
bradh352 Nov 15, 2023
75a76a4
meta: move cjihrig to TSC regular member
cjihrig Nov 24, 2023
ee14a96
src: fix coverity warning
mhdawson Nov 24, 2023
5b17fc9
fs: fix to not return for void function
Nov 24, 2023
0b110cc
deps: update zlib to 1.2.13.1-motley-5daffc7
nodejs-github-bot Nov 24, 2023
33009c7
doc: update email to reflect affiliation
anonrig Nov 24, 2023
c185b8d
v8,tools: expose necessary V8 defines
zcbenz Nov 25, 2023
03d5eff
doc: add a section regarding `instanceof` in `primordials.md`
aduh95 Nov 25, 2023
31bd119
meta: clarify recommendation for bug reproductions
aduh95 Nov 25, 2023
a24623e
src: assert return value of BN_bn2binpad
tniessen Nov 25, 2023
e9c4813
fs: fix glob returning duplicates
MoLow Nov 26, 2023
6d2e379
benchmark: update iterations in benchmark/util/splice-one.js
Septa2112 Nov 26, 2023
810905c
meta: clarify nomination process according to Node.js charter
mcollina Nov 26, 2023
31e837c
fs: improve error performance for `rmdirSync`
CanadaHonk Nov 26, 2023
a59ff19
fs: add c++ fast path for writeFileSync utf8
CanadaHonk Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ body:
- type: textarea
attributes:
label: What steps will reproduce the bug?
description: Enter details about your bug, preferably a simple code snippet that can be run using `node` directly without installing third-party dependencies.
description: >
Enter details about your bug, preferably a simple code snippet that can
be run using `node` directly without installing third-party dependencies
or downloading code from the internet (i.e. no ZIP archive, no GitHub
repository, etc.).
- type: textarea
attributes:
label: How often does it reproduce? Is there a required condition?
Expand Down
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ xiaoyu <[email protected]>
Xu Meng <[email protected]> <[email protected]>
Xuguang Mei <[email protected]> <[email protected]>
Yael Hermon <[email protected]> <[email protected]>
Yagiz Nizipli <[email protected]> <[email protected]>
Yang Guo <[email protected]>
Yash Ladha <[email protected]> <[email protected]>
Yash Ladha <[email protected]> <[email protected]>
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V21.md#21.0.0">21.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.9.0">20.9.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.10.0">20.10.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.9.0">20.9.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.8.1">20.8.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.8.0">20.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.7.0">20.7.0</a><br/>
Expand Down
5 changes: 3 additions & 2 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ Provide a summary of the nominee's contributions. For example:
Mention @nodejs/collaborators in the issue to notify other collaborators about
the nomination.

The nomination passes if no collaborators oppose it after one week. Otherwise,
the nomination fails.
The nomination passes if no collaborators oppose it after one week. In the case
of an objection, the TSC is responsible for working with the individuals
involved and finding a resolution.

There are steps a nominator can take in advance to make a nomination as
frictionless as possible. To request feedback from other collaborators in
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,13 @@ For information about the governance of the Node.js project, see
* [aduh95](https://github.com/aduh95) -
**Antoine du Hamel** <<[email protected]>> (he/him)
* [anonrig](https://github.com/anonrig) -
**Yagiz Nizipli** <<yagiz@nizipli.com>> (he/him)
**Yagiz Nizipli** <<yagiz.nizipli@sentry.io>> (he/him)
* [apapirovski](https://github.com/apapirovski) -
**Anatoli Papirovski** <<[email protected]>> (he/him)
* [benjamingr](https://github.com/benjamingr) -
**Benjamin Gruenbaum** <<[email protected]>>
* [BridgeAR](https://github.com/BridgeAR) -
**Ruben Bridgewater** <<[email protected]>> (he/him)
* [cjihrig](https://github.com/cjihrig) -
**Colin Ihrig** <<[email protected]>> (he/him)
* [GeoffreyBooth](https://github.com/geoffreybooth) -
**Geoffrey Booth** <<[email protected]>> (he/him)
* [gireeshpunathil](https://github.com/gireeshpunathil) -
Expand Down Expand Up @@ -213,6 +211,8 @@ For information about the governance of the Node.js project, see
**Ben Noordhuis** <<[email protected]>>
* [ChALkeR](https://github.com/ChALkeR) -
**Сковорода Никита Андреевич** <<[email protected]>> (he/him)
* [cjihrig](https://github.com/cjihrig) -
**Colin Ihrig** <<[email protected]>> (he/him)
* [codebytere](https://github.com/codebytere) -
**Shelley Vohr** <<[email protected]>> (she/her)
* [danbev](https://github.com/danbev) -
Expand Down Expand Up @@ -288,7 +288,7 @@ For information about the governance of the Node.js project, see
* [aduh95](https://github.com/aduh95) -
**Antoine du Hamel** <<[email protected]>> (he/him)
* [anonrig](https://github.com/anonrig) -
**Yagiz Nizipli** <<yagiz@nizipli.com>> (he/him)
**Yagiz Nizipli** <<yagiz.nizipli@sentry.io>> (he/him)
* [antsmartian](https://github.com/antsmartian) -
**Anto Aravinth** <<[email protected]>> (he/him)
* [apapirovski](https://github.com/apapirovski) -
Expand Down Expand Up @@ -715,6 +715,8 @@ maintaining the Node.js project.
**Qingyu Deng** <<[email protected]>>
* [bmuenzenmeyer](https://github.com/bmuenzenmeyer) -
**Brian Muenzenmeyer** <<[email protected]>> (he/him)
* [CanadaHonk](https://github.com/CanadaHonk) -
**Oliver Medhurst** <<[email protected]>> (they/them)
* [daeyeon](https://github.com/daeyeon) -
**Daeyeon Jeong** <<[email protected]>> (he/him)
* [F3n67u](https://github.com/F3n67u) -
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/aes-gcm-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const common = require('../common.js');
const crypto = require('crypto');
const keylen = { 'aes-128-gcm': 16, 'aes-192-gcm': 24, 'aes-256-gcm': 32 };
const bench = common.createBenchmark(main, {
n: [500],
n: [2500],
cipher: ['aes-128-gcm', 'aes-192-gcm', 'aes-256-gcm'],
len: [1024, 4 * 1024, 16 * 1024, 64 * 1024, 256 * 1024, 1024 * 1024],
});
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/get-ciphers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const common = require('../common.js');

const bench = common.createBenchmark(main, {
n: [1, 5000],
n: [1, 500000],
v: ['crypto', 'tls'],
});

Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/webcrypto-digest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
sync: ['createHash', 'subtle'],
data: [10, 20, 50, 100],
method: ['SHA-1', 'SHA-256', 'SHA-384', 'SHA-512'],
n: [1e3],
n: [1e5],
});

const kMethods = {
Expand Down
32 changes: 32 additions & 0 deletions benchmark/esm/import-meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
'use strict';

const path = require('path');
const { pathToFileURL, fileURLToPath } = require('url');
const common = require('../common');
const assert = require('assert');
const bench = common.createBenchmark(main, {
n: [1000],
});

const file = pathToFileURL(
path.resolve(__filename, '../../fixtures/esm-dir-file.mjs'),
);
async function load(array, n) {
for (let i = 0; i < n; i++) {
array[i] = await import(`${file}?i=${i}`);
}
return array;
}

function main({ n }) {
const array = [];
for (let i = 0; i < n; ++i) {
array.push({ dirname: '', filename: '', i: 0 });
}

bench.start();
load(array, n).then((arr) => {
bench.end(n);
assert.strictEqual(arr[n - 1].filename, fileURLToPath(file));
});
}
5 changes: 2 additions & 3 deletions benchmark/fixtures/esm-dir-file.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import assert from 'assert';
assert.ok(import.meta.dirname);
assert.ok(import.meta.filename);
export const dirname = import.meta.dirname;
export const filename = import.meta.filename;
5 changes: 0 additions & 5 deletions benchmark/fixtures/load-esm-dir-file.js

This file was deleted.

42 changes: 42 additions & 0 deletions benchmark/fs/bench-rmdirSync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
'use strict';

const common = require('../common');
const fs = require('fs');
const tmpdir = require('../../test/common/tmpdir');
tmpdir.refresh();

const bench = common.createBenchmark(main, {
type: ['existing', 'non-existing'],
n: [1e4],
});

function main({ n, type }) {
switch (type) {
case 'existing': {
for (let i = 0; i < n; i++) {
fs.mkdirSync(tmpdir.resolve(`rmdirsync-bench-dir-${i}`));
}

bench.start();
for (let i = 0; i < n; i++) {
fs.rmdirSync(tmpdir.resolve(`rmdirsync-bench-dir-${i}`));
}
bench.end(n);
break;
}
case 'non-existing': {
bench.start();
for (let i = 0; i < n; i++) {
try {
fs.rmdirSync(tmpdir.resolve(`.non-existent-folder-${i}`));
} catch {
// do nothing
}
}
bench.end(n);
break;
}
default:
new Error('Invalid type');
}
}
22 changes: 15 additions & 7 deletions benchmark/fs/bench-statSync-failure.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,29 @@ const fs = require('fs');
const path = require('path');

const bench = common.createBenchmark(main, {
n: [1e6],
statSyncType: ['throw', 'noThrow'],
n: [1e4],
statSyncType: ['fstatSync', 'lstatSync', 'statSync'],
throwType: [ 'throw', 'noThrow' ],
}, {
// fstatSync does not support throwIfNoEntry
combinationFilter: ({ statSyncType, throwType }) => !(statSyncType === 'fstatSync' && throwType === 'noThrow'),
});


function main({ n, statSyncType }) {
const arg = path.join(__dirname, 'non.existent');
function main({ n, statSyncType, throwType }) {
const arg = (statSyncType === 'fstatSync' ?
(1 << 30) :
path.join(__dirname, 'non.existent'));

const fn = fs[statSyncType];

bench.start();
for (let i = 0; i < n; i++) {
if (statSyncType === 'noThrow') {
fs.statSync(arg, { throwIfNoEntry: false });
if (throwType === 'noThrow') {
fn(arg, { throwIfNoEntry: false });
} else {
try {
fs.statSync(arg);
fn(arg);
} catch {
// Continue regardless of error.
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-statSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const common = require('../common');
const fs = require('fs');

const bench = common.createBenchmark(main, {
n: [1e6],
n: [1e4],
statSyncType: ['fstatSync', 'lstatSync', 'statSync'],
});

Expand Down
43 changes: 43 additions & 0 deletions benchmark/fs/bench-writeFileSync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
'use strict';

const common = require('../common.js');
const fs = require('fs');
const tmpdir = require('../../test/common/tmpdir');
tmpdir.refresh();

// Some variants are commented out as they do not show a change and just slow
const bench = common.createBenchmark(main, {
encoding: ['utf8'],
useFd: ['true', 'false'],
length: [1024, 102400, 1024 * 1024],

// useBuffer: ['true', 'false'],
useBuffer: ['false'],

// func: ['appendFile', 'writeFile'],
func: ['writeFile'],

n: [1e3],
});

function main({ n, func, encoding, length, useFd, useBuffer }) {
tmpdir.refresh();
const enc = encoding === 'undefined' ? undefined : encoding;
const path = tmpdir.resolve(`.writefilesync-file-${Date.now()}`);

useFd = useFd === 'true';
const file = useFd ? fs.openSync(path, 'w') : path;

let data = 'a'.repeat(length);
if (useBuffer === 'true') data = Buffer.from(data, encoding);

const fn = fs[func + 'Sync'];

bench.start();
for (let i = 0; i < n; ++i) {
fn(file, data, enc);
}
bench.end(n);

if (useFd) fs.closeSync(file);
}
1 change: 0 additions & 1 deletion benchmark/misc/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const bench = common.createBenchmark(main, {
script: [
'benchmark/fixtures/require-builtins',
'test/fixtures/semicolon',
'benchmark/fixtures/load-esm-dir-file',
],
mode: ['process', 'worker'],
count: [30],
Expand Down
23 changes: 23 additions & 0 deletions benchmark/perf_hooks/now.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

const assert = require('assert');
const common = require('../common.js');

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

function main({ n }) {
const arr = [];
for (let i = 0; i < n; ++i) {
arr.push(performance.now());
}

bench.start();
for (let i = 0; i < n; i++) {
arr[i] = performance.now();
}
bench.end(n);

assert.strictEqual(arr.length, n);
}
2 changes: 1 addition & 1 deletion benchmark/util/splice-one.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const common = require('../common');

const bench = common.createBenchmark(main, {
n: [1e5],
n: [5e6],
pos: ['start', 'middle', 'end'],
size: [10, 100, 500],
}, { flags: ['--expose-internals'] });
Expand Down
Loading
Loading