Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
f1a8f44
node-api: added SharedArrayBuffer api
mertcanaltin Sep 16, 2025
64a8b4b
crypto: expose signatureAlgorithm on X509Certificate
patrickrbc Sep 16, 2025
1ebe88f
stream: use new AsyncResource instead of bind
mcollina Sep 16, 2025
db926dc
src: replace FIXED_ONE_BYTE_STRING with Environment-cached strings
iknoom Sep 17, 2025
e596098
src: reduce the nearest parent package JSON cache size
michaelsmithxyz Sep 17, 2025
f6ea5bf
fs,win: do not add a second trailing slash in readdir
Flarna Sep 17, 2025
c462602
module: only put directly require-d ESM into require.cache
joyeecheung Sep 17, 2025
5c7b83a
test: guard write to proxy client if proxy connection is ended
joyeecheung Sep 17, 2025
ed71aee
src: use DictionaryTemplate more in URLPattern
jasnell Sep 17, 2025
f551c31
tools: fix `tools/make-v8.sh` for clang
richardlau Sep 17, 2025
65bee02
http: add shouldUpgradeCallback to let servers control HTTP upgrades
pimterry Sep 17, 2025
97e55f8
sqlite: add tagged template
0hmX Sep 17, 2025
f6f8eb7
meta: add .npmrc with ignore-scripts=true
joyeecheung Sep 17, 2025
3a5c97e
deps: upgrade openssl sources to openssl-3.5.3
nodejs-github-bot Sep 16, 2025
d9959a5
deps: update archs files for openssl-3.5.3
nodejs-github-bot Sep 16, 2025
d94735c
tls: only do off-thread certificate loading on loading tls
joyeecheung Sep 11, 2025
57f61ad
tls: load bundled and extra certificates off-thread
joyeecheung Sep 11, 2025
c7b0dfb
esm: make hasAsyncGraph non-enumerable
joyeecheung Sep 18, 2025
897932c
diagnostics_channel: fix race condition with diagnostics_channel and GC
uurien Sep 19, 2025
4612c79
vm: expose hasTopLevelAwait on SourceTextModule
legendecas Sep 19, 2025
3625623
src: cleanup quic TransportParams class
jasnell Sep 20, 2025
2a0fcdb
http2: fix allowHttp1+Upgrade, broken by shouldUpgradeCallback
pimterry Sep 20, 2025
2388088
src: rename private fields to follow naming convention
iknoom Sep 20, 2025
f6d6b91
src: simplify is_callable by making it a concept
tniessen Sep 20, 2025
39d7303
lib: use validators for argument validation
meteorqz6 Sep 21, 2025
aa6838c
lib: update inspect output format for subclasses
miguelmarcondesf Sep 21, 2025
1d8df51
test: testcase demonstrating issue 59541
ericrannaud Sep 7, 2025
cb5c8ec
vm: "afterEvaluate", evaluate() return a promise from the outer context
ericrannaud Sep 10, 2025
c81b1df
vm: explain how to share promises between contexts w/ afterEvaluate
ericrannaud Sep 19, 2025
55cd2e5
dgram: restore buffer optimization in fixBufferList
ri7116 Sep 21, 2025
3e79dba
doc: update V8 fast API guidance
Renegade334 Sep 21, 2025
ce748f6
src: use `Global` for storing resource in Node-API callback scope
addaleax Sep 9, 2025
0ec1d18
src: always use strong reference to `napi_async_context` resource
addaleax Sep 10, 2025
fe889ef
build: add the missing macro definitions for OpenHarmony
hqzing Sep 22, 2025
327e175
src: update crypto objects to use DictionaryTemplate
jasnell Sep 22, 2025
54c4567
zlib: reduce code duplication
jhofstee Sep 22, 2025
81af7b9
http,https: handle IPv6 with proxies
joyeecheung Sep 22, 2025
4396cf2
wasm: enable JSPI
guybedford Sep 20, 2025
3c0c160
deps: update googletest to 50b8600
nodejs-github-bot Sep 23, 2025
0a72b2c
doc: fix typo in section on microtask order
tniessen Sep 23, 2025
24ded11
worker: add heap profile API
theanarkh Sep 23, 2025
d2ff9da
sqlite: fix crash session extension callbacks with workers
louwers Sep 23, 2025
9692677
src: simplify watchdog instantiations via `std::optional`
addaleax Sep 23, 2025
f46444d
doc: use "WebAssembly" instead of "Web Assembly"
tniessen Sep 24, 2025
f5e2ecc
2025-09-24, Version 22.20.0 'Jod' (LTS)
nodejs-github-bot Sep 22, 2025
e9a0912
perf_hooks: fix histogram fast call signatures
Renegade334 Jul 9, 2025
5ac6ee7
process: fix hrtime fast call signatures
Renegade334 Jul 13, 2025
4f4d5b3
wasi: fix WasiFunction fast call signature
Renegade334 Jul 13, 2025
8ca5fec
timers: fix binding fast call signatures
Renegade334 Jul 13, 2025
e4e86ea
typings: update 'types' binding
Renegade334 Sep 24, 2025
b49089c
benchmark: update num to n in dgram offset-length
brunocroh Sep 1, 2025
6ce89d7
benchmark: adjust dgram offset-length len values
brunocroh Sep 1, 2025
4dc19ec
test: verify tracing channel doesn't swallow unhandledRejection
Flarna Sep 24, 2025
1e008da
benchmark: update num to n in dgram offset-length
brunocroh Sep 12, 2025
43007e3
benchmark: update count to n in permission startup
brunocroh Sep 12, 2025
0817b40
benchmark: remove unused variable from util/priority-queue
brunocroh Sep 12, 2025
eb1e671
deps: update ada to 3.2.9
nodejs-github-bot Sep 25, 2025
3312e4e
src: unflag --experimental-webstorage by default
danielmbrasil Sep 25, 2025
d3ee5d9
doc: fix typo of built-in module specifier in worker_threads
deokjinkim Sep 25, 2025
ce72fcc
2025-09-25, Version 24.9.0 (Current)
nodejs-github-bot Sep 24, 2025
157cfde
doc: provide alternative to `url.parse()` using WHATWG URL
styfle Sep 2, 2025
2e5c8df
doc: mention reverse proxy and include simple example
styfle Sep 4, 2025
65a32ba
deps: add ngtcp2 test binaries
jasnell Sep 20, 2025
cff138c
tests: start adding quic test server utilities
jasnell Sep 20, 2025
3e1adce
src: use RAII for uv_process_options_t
iknoom Sep 20, 2025
c6316f9
src: fill `options_args`, `options_env` after vectors are finalized
iknoom Sep 22, 2025
9ac571d
test: add new `startNewREPLSever` testing utility
dario-piotrowicz Jul 20, 2025
b51fd73
test: fix typo of test-benchmark-readline.js
deokjinkim Sep 23, 2025
93ee08c
test: expand tls-check-server-identity coverage
diangogav Sep 24, 2025
075936b
src: use std::string_view from node_report
iknoom Sep 18, 2025
4136934
sqlite: replace `ToLocalChecked` and improve filter error handling
geeksilva97 Sep 26, 2025
c2536ad
console,util: improve array inspection performance
BridgeAR Sep 27, 2025
3c36ad0
deps: update amaro to 1.1.4
pmarchini Sep 29, 2025
5d1adb8
src: bring permissions macros in line with general C/C++ standards
addaleax Sep 28, 2025
e4e859e
src: remove useless dereferencing in `THROW_...`
addaleax Sep 28, 2025
77cf2ef
src: avoid unnecessary string -> `char*` -> string round trips
addaleax Sep 28, 2025
0cc1304
src: remove unnecessary shadowed functions on Utf8Value & BufferValue
addaleax Sep 28, 2025
2e2f4cd
src: remove unnecessary `std::string` error messages
addaleax Sep 28, 2025
3b0b6b9
src: allow `std::string_view` arguments to `SPrintF()` and friends
addaleax Sep 28, 2025
1d49478
tools: use dependabot cooldown and move tools/doc
RafaelGSS Sep 30, 2025
f304bc2
test: mark sea tests flaky on macOS x64
richardlau Sep 30, 2025
76e1820
src: make ToLower/ToUpper input args more flexible
addaleax Sep 28, 2025
4a9a022
src: avoid unnecessary string allocations in SPrintF impl
addaleax Sep 28, 2025
b217051
sqlite: create authorization api
araujogui Sep 18, 2025
3dc8c57
doc,crypto: reorder ML-KEM in the asymmetric key types table
panva Oct 1, 2025
9790315
test: ensure message event fires in worker message port test
Jarred-Sumner Oct 1, 2025
c08164d
test: mark test-web-locks skip on IBM i
sravani1510 Oct 1, 2025
b8ea0e8
process: fix default `env` for `process.execve`
richardlau Oct 1, 2025
b5638e1
meta: move Michael to emeritus
mhdawson Oct 1, 2025
23b8340
wasm: revert enable JSPI as already enabled
guybedford Sep 25, 2025
69144e9
module: use sync cjs when importing cts
marco-ippolito Oct 2, 2025
5ac8f26
deps: update ada to 3.3.0
nodejs-github-bot Oct 2, 2025
0eda17b
build: fix flags for ngtcp2 on IBM i
sravani1510 Oct 2, 2025
5d843c9
deps: upgrade npm to 11.6.1
npm-cli-bot Oct 2, 2025
36b1cc2
src: remove unused variables from report
iknoom Oct 2, 2025
f468b6c
build: update minimum Xcode version to 16.4
targos Oct 3, 2025
51df7b9
doc: update macOS version used to build releases
targos Oct 3, 2025
bb04959
doc: mark `.env` files support as stable
Hilzu Oct 3, 2025
79f1999
console: allow per-stream `inspectOptions` option
addaleax Oct 1, 2025
f4bc574
meta: bump github/codeql-action from 3.30.0 to 3.30.5
dependabot[bot] Oct 3, 2025
eda67ac
meta: bump codecov/codecov-action from 5.5.0 to 5.5.1
dependabot[bot] Oct 3, 2025
01ce61f
deps: upgrade openssl sources to openssl-3.5.4
nodejs-github-bot Oct 1, 2025
947ea53
deps: update archs files for openssl-3.5.4
nodejs-github-bot Oct 1, 2025
3d5cf5b
tools: use cooldown property correctly
RafaelGSS Oct 3, 2025
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
  •  
  •  
  •  
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ updates:
directory: /
schedule:
interval: monthly
cooldown:
semver-major-days: 5
semver-minor-days: 5
semver-patch-days: 5

commit-message:
prefix: meta
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
Expand All @@ -14,6 +19,10 @@ updates:
directory: /tools/eslint
schedule:
interval: monthly
cooldown:
semver-major-days: 5
semver-minor-days: 5
semver-patch-days: 5
commit-message:
prefix: tools
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
Expand All @@ -27,6 +36,10 @@ updates:
directory: /tools/lint-md
schedule:
interval: monthly
cooldown:
semver-major-days: 5
semver-minor-days: 5
semver-patch-days: 5
commit-message:
prefix: tools
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
Expand All @@ -35,3 +48,20 @@ updates:
applies-to: version-updates
patterns:
- '*'

- package-ecosystem: npm
directory: /tools/doc
schedule:
interval: weekly
cooldown:
semver-major-days: 5
semver-minor-days: 5
semver-patch-days: 5
commit-message:
prefix: tools
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
groups:
doc:
applies-to: version-updates
patterns:
- '*'
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml

- name: Autobuild
uses: github/codeql-action/autobuild@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
with:
category: /language:${{matrix.language}}
2 changes: 1 addition & 1 deletion .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ jobs:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
directory: ./coverage
2 changes: 1 addition & 1 deletion .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ jobs:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
- name: Upload
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
directory: ./coverage
2 changes: 1 addition & 1 deletion .github/workflows/coverage-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ jobs:
- name: Clean tmp
run: npx rimraf ./coverage/tmp
- name: Upload
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
directory: ./coverage
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
with:
sarif_file: results.sarif
17 changes: 0 additions & 17 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ on:
- c-ares
- cjs-module-lexer
- corepack
- doc
- googletest
- gyp-next
- histogram
Expand Down Expand Up @@ -118,22 +117,6 @@ jobs:
run: |
make corepack-update
echo "NEW_VERSION=$(node deps/corepack/dist/corepack.js --version)" >> $GITHUB_ENV
- id: doc
subsystem: tools
label: tools
run: |
cd tools/doc
npm ci
NEW_VERSION=$(npm outdated --parseable | cut -d: -f4 | xargs)
if [ "$NEW_VERSION" != "" ]; then
echo "NEW_VERSION=new version" >> $GITHUB_ENV
rm -rf package-lock.json node_modules
# Include $NEW_VERSION to explicitly update the package.json
# entry for the dependency and also so that semver-major updates
# are not skipped.
npm install --ignore-scripts $NEW_VERSION
npm install --ignore-scripts
fi
- id: googletest
subsystem: deps
label: dependencies, test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
!.nycrc
!.yamllint.yaml
!.configurations/
!/.npmrc

# === Rules for root dir ===
/core
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-scripts=true
8 changes: 4 additions & 4 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Depending on the host platform, the selection of toolchains may vary.
| ---------------- | -------------------------------------------------------------- |
| Linux | GCC >= 12.2 or Clang >= 19.1 |
| Windows | Visual Studio >= 2022 with the Windows 10 SDK on a 64-bit host |
| macOS | Xcode >= 16.3 (Apple LLVM >= 19) |
| macOS | Xcode >= 16.4 (Apple LLVM >= 19) |

### Official binary platforms and toolchains

Expand All @@ -166,8 +166,8 @@ Binaries at <https://nodejs.org/download/release/> are produced on:
| Binary package | Platform and Toolchain |
| ----------------------- | ------------------------------------------------------------- |
| aix-ppc64 | AIX 7.2 TL04 on PPC64BE with GCC 12[^5] |
| darwin-x64 | macOS 13, Xcode 16 with -mmacosx-version-min=13.5 |
| darwin-arm64 (and .pkg) | macOS 13 (arm64), Xcode 16 with -mmacosx-version-min=13.5 |
| darwin-x64 | macOS 15, Xcode 16 with -mmacosx-version-min=13.5 |
| darwin-arm64 (and .pkg) | macOS 15 (arm64), Xcode 16 with -mmacosx-version-min=13.5 |
| linux-arm64 | RHEL 8 with Clang 19.1 and gcc-toolset-14-libatomic-devel[^6] |
| linux-ppc64le | RHEL 8 with Clang 19.1 and gcc-toolset-14-libatomic-devel[^6] |
| linux-s390x | RHEL 8 with Clang 19.1 and gcc-toolset-14-libatomic-devel[^6] |
Expand Down Expand Up @@ -249,7 +249,7 @@ FreeBSD and OpenBSD users may also need to install `libexecinfo`.

#### macOS prerequisites

* Xcode Command Line Tools >= 16.3 for macOS
* Xcode Command Line Tools >= 16.4 for macOS
* [A supported version of Python][Python versions]
* For test coverage, your Python installation must include pip.

Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V24.md#24.8.0">24.8.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V24.md#24.9.0">24.9.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V24.md#24.8.0">24.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V24.md#24.7.0">24.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V24.md#24.6.0">24.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V24.md#24.5.0">24.5.0</a><br/>
Expand All @@ -53,7 +54,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V24.md#24.0.0">24.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.19.0">22.19.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.20.0">22.20.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.19.0">22.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.18.0">22.18.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.17.1">22.17.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.17.0">22.17.0</a><br/>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ For information about the governance of the Node.js project, see
**Marco Ippolito** <<marcoippolito54@gmail.com>> (he/him)
* [mcollina](https://github.com/mcollina) -
**Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
* [mhdawson](https://github.com/mhdawson) -
**Michael Dawson** <<midawson@redhat.com>> (he/him)
* [panva](https://github.com/panva) -
**Filip Skokan** <<panva.ip@gmail.com>> (he/him)
* [RafaelGSS](https://github.com/RafaelGSS) -
Expand Down Expand Up @@ -240,6 +238,8 @@ For information about the governance of the Node.js project, see
**Isaac Z. Schlueter** <<i@izs.me>>
* [joshgav](https://github.com/joshgav) -
**Josh Gavant** <<josh.gavant@outlook.com>>
* [mhdawson](https://github.com/mhdawson) -
**Michael Dawson** <<midawson@redhat.com>> (he/him)
* [mmarchini](https://github.com/mmarchini) -
**Mary Marchini** <<oss@mmarchini.me>> (she/her)
* [mscdex](https://github.com/mscdex) -
Expand Down
12 changes: 6 additions & 6 deletions benchmark/dgram/offset-length.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ const common = require('../common.js');
const dgram = require('dgram');
const PORT = common.PORT;

// `num` is the number of send requests to queue up each time.
// `n` is the number of send requests to queue up each time.
// Keep it reasonably high (>10) otherwise you're benchmarking the speed of
// event loop cycles more than anything else.
const bench = common.createBenchmark(main, {
len: [1, 64, 256, 1024],
num: [100],
len: [1, 512, 1024],
n: [100],
type: ['send', 'recv'],
dur: [5],
});

function main({ dur, len, num, type }) {
function main({ dur, len, n, type }) {
const chunk = Buffer.allocUnsafe(len);
let sent = 0;
let received = 0;
const socket = dgram.createSocket('udp4');

function onsend() {
if (sent++ % num === 0) {
if (sent++ % n === 0) {
// The setImmediate() is necessary to have event loop progress on OSes
// that only perform synchronous I/O on nonblocking UDP sockets.
setImmediate(() => {
for (let i = 0; i < num; i++) {
for (let i = 0; i < n; i++) {
socket.send(chunk, 0, chunk.length, PORT, '127.0.0.1', onsend);
}
});
Expand Down
52 changes: 52 additions & 0 deletions benchmark/dgram/send-types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
'use strict';

const common = require('../common.js');
const dgram = require('dgram');
const { Buffer } = require('buffer');

const bench = common.createBenchmark(main, {
type: ['string', 'buffer', 'mixed', 'typedarray'],
chunks: [1, 4, 8, 16],
len: [64, 512, 1024],
n: [1000],
});

function main({ type, chunks, len, n }) {
const socket = dgram.createSocket('udp4');

let testData;
switch (type) {
case 'string':
testData = Array(chunks).fill('a'.repeat(len));
break;
case 'buffer':
testData = Array(chunks).fill(Buffer.alloc(len, 'a'));
break;
case 'mixed':
testData = [];
for (let i = 0; i < chunks; i++) {
if (i % 2 === 0) {
testData.push(Buffer.alloc(len, 'a'));
} else {
testData.push('a'.repeat(len));
}
}
break;
case 'typedarray':
testData = Array(chunks).fill(new Uint8Array(len).fill(97));
break;
}

bench.start();

for (let i = 0; i < n; i++) {
socket.send(testData, 12345, 'localhost', (err) => {
if (err && err.code !== 'ENOTCONN' && err.code !== 'ECONNREFUSED') {
throw err;
}
});
}

bench.end(n);
socket.close();
}
8 changes: 4 additions & 4 deletions benchmark/dgram/single-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ const PORT = common.PORT;
// event loop cycles more than anything else.
const bench = common.createBenchmark(main, {
len: [1, 64, 256, 1024],
num: [100],
n: [100],
type: ['send', 'recv'],
dur: [5],
});

function main({ dur, len, num, type }) {
function main({ dur, len, num: n, type }) {
const chunk = Buffer.allocUnsafe(len);
let sent = 0;
let received = 0;
const socket = dgram.createSocket('udp4');

function onsend() {
if (sent++ % num === 0) {
if (sent++ % n === 0) {
// The setImmediate() is necessary to have event loop progress on OSes
// that only perform synchronous I/O on nonblocking UDP sockets.
setImmediate(() => {
for (let i = 0; i < num; i++) {
for (let i = 0; i < n; i++) {
socket.send(chunk, PORT, '127.0.0.1', onsend);
}
});
Expand Down
12 changes: 6 additions & 6 deletions benchmark/permission/permission-startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const bench = common.createBenchmark(main, {
],
prefixPath: ['/tmp'],
nFiles: [10, 100, 1000],
count: [30],
n: [30],
});

function spawnProcess(script, bench, state) {
const cmd = process.execPath || process.argv[0];
while (state.finished < state.count) {
while (state.finished < state.n) {
const child = spawnSync(cmd, script);
if (child.status !== 0) {
console.log('---- STDOUT ----');
Expand All @@ -39,13 +39,13 @@ function spawnProcess(script, bench, state) {
bench.start();
}

if (state.finished === state.count) {
bench.end(state.count);
if (state.finished === state.n) {
bench.end(state.n);
}
}
}

function main({ count, script, nFiles, prefixPath }) {
function main({ n, script, nFiles, prefixPath }) {
script = path.resolve(__dirname, '../../', `${script}.js`);
const optionsWithScript = [
'--permission',
Expand All @@ -54,6 +54,6 @@ function main({ count, script, nFiles, prefixPath }) {
script,
];
const warmup = 3;
const state = { count, finished: -warmup };
const state = { n, finished: -warmup };
spawnProcess(optionsWithScript, bench, state);
}
2 changes: 1 addition & 1 deletion benchmark/util/priority-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const bench = common.createBenchmark(main, {
n: [1e5],
}, { flags: ['--expose-internals'] });

function main({ n, type }) {
function main({ n }) {
const PriorityQueue = require('internal/priority_queue');
const queue = new PriorityQueue();
bench.start();
Expand Down
2 changes: 1 addition & 1 deletion benchmark/webstorage/getItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function nextLocalStorage() {
}

const options = {
flags: ['--experimental-webstorage', `--localstorage-file=${nextLocalStorage()}`],
flags: [`--localstorage-file=${nextLocalStorage()}`],
};

const bench = common.createBenchmark(main, {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/webstorage/removeItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function nextLocalStorage() {
}

const options = {
flags: ['--experimental-webstorage', `--localstorage-file=${nextLocalStorage()}`],
flags: [`--localstorage-file=${nextLocalStorage()}`],
};

const bench = common.createBenchmark(main, {
Expand Down
Loading
Loading