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

v13.6.0 proposal #31238

Merged
merged 180 commits into from
Jan 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
f8aa365
assert: use for...of
soar-beep Dec 16, 2019
32805a9
deps,src,test: update to uvwasi 0.0.3
cjihrig Dec 15, 2019
d6f9420
doc,lib,src,test: rename WASI CLI flag
cjihrig Dec 15, 2019
d36ae62
test: remove obsolete WASI test
cjihrig Dec 15, 2019
0e864a3
benchmark: update manywrites back pressure
ronag Dec 15, 2019
7815d5f
doc: update message.url example in http.IncomingMessage
saitolume Dec 7, 2019
3753f47
test: use tmpdir.refresh() in test-esm-windows.js
richardlau Dec 16, 2019
7f6a0ed
fs: allow overriding fs for streams
ronag Aug 11, 2019
cc8c0b4
doc: reference worker threads on signal events
legendecas Dec 16, 2019
a386114
doc: clarify required flag for extensionless esm
azz Nov 26, 2019
e5a4155
src: fix compiler warning in env.cc
addaleax Dec 18, 2019
6b65caf
src: list used functions on headers
juanarbol Dec 6, 2019
f570de8
events: allow monitoring error events
Flarna Dec 12, 2019
4df3652
buffer: improve .from() error details
BridgeAR Sep 23, 2019
33c5dbe
errors: improve ERR_INVALID_ARG_TYPE
BridgeAR Sep 23, 2019
54c471a
test: fix flaky test-http2-client-upload
Flarna Oct 8, 2019
625744d
benchmark: add clear connections to secure-pair
DiegoTUI May 30, 2019
93cf123
test: fix long lines
cjihrig Dec 18, 2019
37ffa8c
bootstrap: use different scripts to setup different configurations
joyeecheung Dec 9, 2019
21ef3d6
dgram: use for...of
trivikr Dec 14, 2019
dadccb7
test: fix common.enoughTestMem
Trott Dec 20, 2019
3c9e435
test: unflake async hooks statwatcher test
lundibundi Nov 10, 2019
e5980a1
test: cover vm with negative tests
Dec 18, 2019
a83d338
lib: improve spelling and grammar in comment
datatypevoid Dec 19, 2019
49a7e73
src: make --use-largepages a runtime option
Dec 13, 2019
c779421
tools: update ESLint to 6.8.0
cjihrig Dec 20, 2019
07e82db
test: get lib/wasi.js coverage to 100%
cjihrig Dec 20, 2019
afecc97
events: add EventEmitter.on to async iterate over events
mcollina May 30, 2019
7e13ae7
deps: V8: cherry-pick d3a1a5b6c491
targos Dec 17, 2019
614b2c5
lib: further simplify assertions in vm/module
addaleax Dec 6, 2019
a27edd8
src,test: use v8::Global instead of v8::Persistent
addaleax Dec 18, 2019
a7988ab
doc: avoid using v8::Persistent in addon docs
addaleax Dec 18, 2019
28a62c3
tools,src: forbid usage of v8::Persistent
addaleax Dec 18, 2019
796a9c0
doc,vm,test: remove _sandbox_ from vm documentation
Trott Dec 22, 2019
69d6e97
doc: implement minor improvements to BUILDING.md text
Trott Dec 23, 2019
86f2e86
http2: wait for session to finish writing before destroy
lundibundi Dec 7, 2019
ba0682e
http2: wait for session socket writable end on close/destroy
lundibundi Dec 8, 2019
7611d5b
util: add colors to debuglog()
BridgeAR Dec 12, 2019
925dd8e
repl: fix preview of lines that exceed the terminal columns
BridgeAR Dec 17, 2019
09ca8be
repl: implement reverse search
BridgeAR Dec 16, 2019
92dcf3e
readline: small refactoring
BridgeAR Dec 17, 2019
ffbf790
readline: set null as callback return in case there's no error
BridgeAR Dec 18, 2019
a699808
util: add (typed) array length to the default output
BridgeAR Dec 19, 2019
048b7f4
tools: fix Raspbian armv7 build
AHgPuK Dec 20, 2019
ca53f02
benchmark: use let instead of var in child_process
dnlup Dec 20, 2019
44d03e8
dgram: test to add and to drop specific membership
universePrisoner Dec 20, 2019
9141366
doc: improve doc net:server.listen
dev-script Dec 23, 2019
1463214
stream: simplify isBuf
ronag Dec 23, 2019
bca23b9
stream: reset flowing state if no 'readable' or 'data' listeners
ronag Dec 20, 2019
7b2bf20
tls: add PSK support
lundibundi Oct 29, 2018
83330a0
timers: do less work in insert
apapirovski Apr 22, 2019
fe4f55e
timers: fix refresh for expired timers
apapirovski Apr 22, 2019
4caf457
doc: add unrepresented flags docs for configure
rexagod Jun 5, 2019
ca22ce2
stream: pipeline should use req.abort() to destroy response
ronag Dec 21, 2019
1357c97
doc: standardize usage of hostname vs. host name
Trott Dec 23, 2019
80732cd
src: port --bash-completion to C++
joyeecheung Feb 3, 2019
4292f64
doc: fix anchors and subtitle in BUILDING.md
sutangu Nov 6, 2019
60dd183
src: prevent hard coding stack trace limit
legendecas Dec 1, 2019
e28e873
test: skip the unsupported test cases for IBM i
dmabupt Dec 6, 2019
7fe8399
deps: V8: cherry-pick d406bfd64653
sam-github Dec 9, 2019
647f3c7
deps: V8: cherry-pick 687d865fe251
ChALkeR Dec 17, 2019
01fd3be
benchmark: include writev in benchmark
ronag Dec 23, 2019
0999d53
repl: use public getCursorPos()
cjihrig Dec 25, 2019
baf8730
build: re-introduce --use-largepages as no-op
Dec 24, 2019
a5937c7
deps: uvwasi: cherry-pick 64e59d5
cjihrig Dec 24, 2019
2ec817e
deps: uvwasi: cherry-pick 75b389c
cjihrig Dec 24, 2019
87f15c0
wasi: throw on failed uvwasi_init()
cjihrig Dec 22, 2019
efc97fd
doc: add --enable-source-maps man page entry
cjihrig Dec 24, 2019
23013e3
doc: add --force-context-aware man page entry
cjihrig Dec 24, 2019
1033760
doc: add --inspect-publish-uid man page entry
cjihrig Dec 24, 2019
d131877
build: fixes build for some os versions
devnexen Oct 27, 2019
31bbae7
zlib: allow writes after readable 'end' to finish
addaleax Dec 24, 2019
54caadc
src: enable stack trace printing for V8 check failures
addaleax Dec 24, 2019
ca05a5b
build: switch realpath to pwd
bcoe Dec 26, 2019
ce60a80
doc: allow <code> in header elements
Trott Dec 23, 2019
9979f82
doc,dns: use code markup/markdown in headers
Trott Dec 23, 2019
ff82890
doc: use code markup/markdown in headers in addons documentation
Trott Dec 23, 2019
118df63
doc,assert: use code markup/markdown in headers
Trott Dec 23, 2019
32e5895
doc,async_hooks: use code markup/markdown in headers
Trott Dec 23, 2019
0e0d45b
doc,buffer: use code markup/markdown in headers
Trott Dec 23, 2019
405bf8c
doc,child_process: use code markup/markdown in headers
Trott Dec 23, 2019
27790fc
doc,cluster: use code markup/markdown in headers
Trott Dec 24, 2019
f8a6eda
doc,console: use code markup/markdown in headers
Trott Dec 24, 2019
df5ec4e
doc,crypto: use code markup/markdown in headers
Trott Dec 24, 2019
7afe69c
doc: use code markup/markdown in headers in deprecations documentation
Trott Dec 24, 2019
4a42230
doc,dgram: use code markup/markdown in headers
Trott Dec 24, 2019
decfcaf
doc,domain: use code markup/markdown in headers
Trott Dec 24, 2019
665a662
doc,errors: use code markup/markdown in headers
Trott Dec 24, 2019
fbb217a
doc,esm: use code markup/markdown in headers
Trott Dec 24, 2019
db01d0f
doc,events: use code markup/markdown in headers
Trott Dec 24, 2019
e7f7e45
doc,fs: use code markup/markdown in headers
Trott Dec 24, 2019
dcce8b6
doc: use code markup/markdown in headers in globals documentation
Trott Dec 24, 2019
cdb79fc
doc,http: use code markup/markdown in headers
Trott Dec 24, 2019
3062bcb
doc,http2: use code markup/markdown in headers
Trott Dec 24, 2019
3571df3
doc,https: use code markup/markdown in headers
Trott Dec 24, 2019
699b31f
doc,inspector: use code markup/markdown in headers
Trott Dec 24, 2019
7d25e44
doc,module: use code markup/markdown in headers
Trott Dec 24, 2019
927b37f
doc,net: use code markup/markdown in headers
Trott Dec 24, 2019
9de9146
doc,os: use code markup/markdown in headers
Trott Dec 24, 2019
5921654
doc,path: use code markup/markdown in headers
Trott Dec 24, 2019
3ee3e6f
doc,perf_hooks: use code markup/markdown in headers
Trott Dec 24, 2019
8c12652
doc,process: use code markup/markdown in headers
Trott Dec 24, 2019
f0bc628
doc,punycode: use code markup/markdown in headers
Trott Dec 24, 2019
125a59a
doc,querystring: use code markup/markdown in headers
Trott Dec 24, 2019
128a69d
doc,readline: use code markup/markdown in headers
Trott Dec 24, 2019
38e09f8
doc,repl: use code markup/markdown in headers
Trott Dec 24, 2019
4c5a985
doc,stream: use code markup/markdown in headers
Trott Dec 24, 2019
cf563bb
doc,string_decoder: use code markup/markdown in headers
Trott Dec 24, 2019
450d9a2
doc,timers: use code markup/markdown in headers
Trott Dec 24, 2019
d6d507a
doc,tls: use code markup/markdown in headers
Trott Dec 24, 2019
9d2082b
doc,tty: use code markup/markdown in headers
Trott Dec 24, 2019
73c598a
doc,url: use code markup/markdown in headers
Trott Dec 24, 2019
a6f16b3
doc,zlib: use code markup/markdown in headers
Trott Dec 24, 2019
4672e10
doc,util: use code markup/markdown in headers
Trott Dec 24, 2019
342d337
doc,v8: use code markup/markdown in headers
Trott Dec 24, 2019
cb3c3fc
doc,worker: use code markup/markdown in headers
Trott Dec 24, 2019
e6fbde5
doc,vm: use code markup/markdown in headers
Trott Dec 25, 2019
1bcc07b
doc,wasi: use code markup/markdown in headers
Trott Dec 25, 2019
4c29a6e
doc: update parameter type for fs.chmod()
santoshyadavdev Dec 27, 2019
72d70d5
doc: improve dns introduction
Trott Dec 25, 2019
2c6f817
src: make large_pages node.cc include conditional
lundibundi Dec 24, 2019
990760e
test: log errors in test-http2-propagate-session-destroy-code
lundibundi Dec 23, 2019
b8ccf30
benchmark: replace var with let/const in cluster benchmark
dnlup Dec 20, 2019
16f60ce
test: increase coverage for _http_incoming.js
Trott Dec 25, 2019
97ce0a3
lib: replace var with let/const
kresimirfranin Nov 12, 2019
d2ab877
build: warn upon --use-largepages config option
Dec 26, 2019
6855788
doc: update parameter type for fsPromises.chmod()
cjihrig Dec 27, 2019
53c6a1e
doc: update mode type for fchmod() functions
cjihrig Dec 27, 2019
2313b9e
doc: update mode type for fs open() functions
cjihrig Dec 27, 2019
a37a88f
doc: update mode type for process.umask()
cjihrig Dec 27, 2019
1fa8e49
doc: update mode type for mkdir() functions
cjihrig Dec 27, 2019
4f32bbb
fs: use consistent defaults in sync stat functions
cjihrig Dec 26, 2019
bd047e8
module: self resolve bug fix and esm ordering
guybedford Dec 17, 2019
18b34de
doc: fix createDiffieHellman generator type
tniessen Dec 28, 2019
799b509
meta: clarify scope of new nodejs.org issue choice
DerekNonGeneric Dec 28, 2019
8491e1c
wasi: fix serdes bugs from snapshot1 migration
cjihrig Dec 28, 2019
10f7169
zlib: use for...of
trivikr Dec 21, 2019
efa0bd8
test: refactor common.expectsError
BridgeAR Dec 25, 2019
85d152f
tools: allow the travis commit message job to fail
BridgeAR Dec 27, 2019
24a0212
esm: empty ext from pkg type/main doesnt affect format
bfarias-godaddy Dec 18, 2019
b657a64
doc: de-duplicate security release processes
sam-github Dec 16, 2019
b193142
benchmark: use let instead of var in crypto
dnlup Dec 30, 2019
b916035
http2: make HTTP2ServerResponse more streams compliant
ronag Dec 14, 2019
d831dc1
assert: implement `assert.match()` and `assert.doesNotMatch()`
BridgeAR Dec 12, 2019
dcbb97e
perf_hooks: move perf_hooks out of experimental
legendecas Dec 26, 2019
e2ef1a9
deps: V8: bump v8_embedder_string for 0e21c1e637bf
ChALkeR Dec 26, 2019
33352c2
doc: clarify role of writable.cork()
GKJCJG Nov 12, 2019
5bf2772
stream: group all properties using defineProperties
antsmartian Dec 31, 2019
827d3fe
benchmark: add benchmark on async_hooks enabled http server
legendecas Dec 26, 2019
72c6460
module: unflag resolve self
guybedford Dec 17, 2019
9b7cf09
build: don't use -latomic on macOS
ryandesign Oct 23, 2019
697908e
util: improve prototype inspection using `inspect()` and `showHidden`
BridgeAR Dec 26, 2019
1057a4c
errors: support prepareSourceMap with source-maps
bcoe Dec 31, 2019
c23bbc6
tools: remove prefer-common-expectserror lint rule
cjihrig Dec 31, 2019
892e7b0
src: suppress warning in src/node_env_var.cc
HarshithaKP Dec 30, 2019
1b720aa
http: free listeners on free sockets
ronag Aug 21, 2019
d3a8088
doc: improve explanation of package.json "type" field
tamias May 1, 2019
bd6a29c
test: use spread object
franher Nov 12, 2019
a6c2502
esm: better error message for unsupported URL
Hakerh400 Dec 29, 2019
4a54f30
http: http_outgoing rename var to let and const
Nov 6, 2019
ca23511
deps: V8: backport a4545db
devnexen Dec 29, 2019
cc44325
doc: update REPL documentation to instantiate the REPL
BridgeAR Dec 12, 2019
dba2ab7
doc: use code markup/markdown in headers
BridgeAR Jan 1, 2020
18acacc
https: prevent options object from being mutated
vighnesh153 Jan 2, 2020
d771221
n-api: keep napi_env alive while it has finalizers
addaleax Dec 30, 2019
7b696fe
doc: remove extra backtick
cjihrig Jan 4, 2020
4b2d8df
lib: do not catch user errors
BridgeAR Jan 1, 2020
ae58c97
perf_hooks: use for...of
trivikr Dec 21, 2019
1527796
lib: replace Set.prototype with SetPrototype primordial
Sebastien-Ahkrin Jan 2, 2020
0b8eaf2
lib: replace WeakMap global by the primordials
Sebastien-Ahkrin Jan 2, 2020
542aae4
lib: replace WeakSet global by the primordials
Sebastien-Ahkrin Jan 2, 2020
3f21ad6
lib: replace Set global by the primordials
Sebastien-Ahkrin Jan 2, 2020
f268621
lib: replace use of Error with primordials
Sebastien-Ahkrin Jan 2, 2020
20ecb5d
lib: replace Map global by the primordials
Sebastien-Ahkrin Jan 2, 2020
b5a71a4
http2: set default enableConnectProtocol to 0
ZYSzys Jan 3, 2020
21d9664
test: change buffer offset to accommodate V8 BackingStore
thangktran Dec 24, 2019
5fccb50
benchmark: use let instead of var in dgram
dnlup Jan 3, 2020
614b074
wasi: refactor destructuring object on constructor
himself65 Jan 4, 2020
42d36dc
lib: move initialization of APIs for changing process state
addaleax Jan 3, 2020
1a552f6
2020-01-07, Version v13.6.0 (Current)
BridgeAR Jan 7, 2020
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ contact_links:
- name: ⁉️ Need help with Node.js?
url: https://github.com/nodejs/help
about: Please file an issue in our help repo.
- name: 🌐 Found a problem with nodejs.org?
- name: 🌐 Found a problem with nodejs.org beyond the API reference docs?
url: https://github.com/nodejs/nodejs.org/issues/new/choose
about: Please file an issue in the Node.js website repo.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@ jobs:
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
allow_failures: # TODO (cclauss): remove this when dependencies are clean
- name: "Find syntax errors in our Python dependencies"
- name: "First commit message adheres to guidelines at <a href=\"https://goo.gl/p2fr5Q\">https://goo.gl/p2fr5Q</a>"
20 changes: 10 additions & 10 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ file a new issue.
* [Unix and macOS](#unix-and-macos)
* [Unix prerequisites](#unix-prerequisites)
* [macOS prerequisites](#macos-prerequisites)
* [Building Node.js](#building-nodejs)
* [Building Node.js](#building-nodejs-1)
* [Running Tests](#running-tests)
* [Running Coverage](#running-coverage)
* [Building the documentation](#building-the-documentation)
* [Building a debug build](#building-a-debug-build)
* [Windows](#windows)
* [Prerequisites](#prerequisites)
* [Option 1: Manual install](#option-1-manual-install)
* [Option 1: Automated install with Boxstarter](#option-1-automated-install-with-boxstarter)
* [Option 2: Automated install with Boxstarter](#option-2-automated-install-with-boxstarter)
* [Building Node.js](#building-nodejs-1)
* [Android/Android-based devices (e.g. Firefox OS)](#androidandroid-based-devices-eg-firefox-os)
* [`Intl` (ECMA-402) support](#intl-ecma-402-support)
Expand Down Expand Up @@ -80,7 +80,7 @@ There are three support tiers:
platforms are welcome.

Platforms may move between tiers between major release lines. The table below
will be updated to reflect those changes.
will reflect those changes.

### Platform list

Expand Down Expand Up @@ -113,26 +113,26 @@ platforms. This is true regardless of entries in the table below.
| AIX | ppc64be >=power7 | >= 7.2 TL02 | Tier 2 | |
| FreeBSD | x64 | >= 11 | Experimental | Downgraded as of Node.js 12 <sup>[7](#fn7)</sup> |

<em id="fn1">1</em>: GCC 6 is not provided on the base platform, users will
<em id="fn1">1</em>: GCC 6 is not provided on the base platform. Users will
need the
[Toolchain test builds PPA](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test?field.series_filter=xenial)
or similar to source a newer compiler.

<em id="fn2">2</em>: GCC 6 is not provided on the base platform, users will
<em id="fn2">2</em>: GCC 6 is not provided on the base platform. Users will
need the
[devtoolset-6](https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/)
or later to source a newer compiler.

<em id="fn3">3</em>: Older kernel versions may work for ARM64, however the
<em id="fn3">3</em>: Older kernel versions may work for ARM64. However the
Node.js test infrastructure only tests >= 4.5.

<em id="fn4">4</em>: On Windows, running Node.js in Windows terminal emulators
like `mintty` requires the usage of [winpty](https://github.com/rprichard/winpty)
for the tty channels to work correctly (e.g. `winpty node.exe script.js`).
for the tty channels to work (e.g. `winpty node.exe script.js`).
In "Git bash" if you call the node shell alias (`node` without the `.exe`
extension), `winpty` is used automatically.

<em id="fn5">5</em>: The Windows Subsystem for Linux (WSL) is not directly
<em id="fn5">5</em>: The Windows Subsystem for Linux (WSL) is not
supported, but the GNU/Linux build process and binaries should work. The
community will only address issues that reproduce on native GNU/Linux
systems. Issues that only reproduce on WSL should be reported in the
Expand All @@ -142,11 +142,11 @@ platforms. This is true regardless of entries in the table below.

<em id="fn6">6</em>: Running Node.js on x86 Windows should work and binaries
are provided. However, tests in our infrastructure only run on WoW64.
Furthermore, compiling on x86 Windows is currently considered Experimental and
Furthermore, compiling on x86 Windows is Experimental and
may not be possible.

<em id="fn7">7</em>: The default FreeBSD 12.0 compiler is Clang 6.0.1, but
FreeBSD 12.1 upgrades to 8.0.1. Other Clang/LLVM versions are provided
FreeBSD 12.1 upgrades to 8.0.1. Other Clang/LLVM versions are available
via the system's package manager, including Clang 9.0.

### Supported toolchains
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V13.md#13.5.0">13.5.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V13.md#13.6.0">13.6.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V13.md#13.5.0">13.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V13.md#13.4.0">13.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V13.md#13.3.0">13.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V13.md#13.2.0">13.2.0</a><br/>
Expand Down
13 changes: 7 additions & 6 deletions CPP_STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ codebase not related to stylistic issues.
* [Align function arguments vertically](#align-function-arguments-vertically)
* [Initialization lists](#initialization-lists)
* [CamelCase for methods, functions, and classes](#camelcase-for-methods-functions-and-classes)
* [snake\_case for local variables and parameters](#snake_case-for-local-variables-and-parameters)
* [snake\_case\_ for private class fields](#snake_case_-for-private-class-fields)
* [snake\_case for C-like structs](#snake_case-for-c-like-structs)
* [`snake_case` for local variables and parameters](#snake_case-for-local-variables-and-parameters)
* [`snake_case_` for private class fields](#snake_case_-for-private-class-fields)
* [`snake_case` for C-like structs](#snake_case-for-c-like-structs)
* [Space after `template`](#space-after-template)
* [Memory Management](#memory-management)
* [Memory allocation](#memory-allocation)
Expand Down Expand Up @@ -155,15 +155,15 @@ class FooBar {
};
```

### snake\_case for local variables and parameters
### `snake_case` for local variables and parameters

```c++
int FunctionThatDoesSomething(const char* important_string) {
const char* pointer_into_string = important_string;
}
```

### snake\_case\_ for private class fields
### `snake_case_` for private class fields

```c++
class Foo {
Expand All @@ -172,7 +172,8 @@ class Foo {
};
```

### snake\_case for C-like structs
### `snake_case` for C-like structs

For plain C-like structs snake_case can be used.

```c++
Expand Down
8 changes: 4 additions & 4 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,21 @@ The common.js module is used by benchmarks for consistency across repeated
tasks. It has a number of helpful functions and properties to help with
writing benchmarks.

### createBenchmark(fn, configs\[, options\])
### `createBenchmark(fn, configs[, options])`

See [the guide on writing benchmarks](writing-and-running-benchmarks.md#basics-of-a-benchmark).

### default\_http\_benchmarker
### `default_http_benchmarker`

The default benchmarker used to run HTTP benchmarks.
See [the guide on writing HTTP benchmarks](writing-and-running-benchmarks.md#creating-an-http-benchmark).

### PORT
### `PORT`

The default port used to run HTTP benchmarks.
See [the guide on writing HTTP benchmarks](writing-and-running-benchmarks.md#creating-an-http-benchmark).

### sendResult(data)
### `sendResult(data)`

Used in special benchmarks that can't use `createBenchmark` and the object
it returns to accomplish what they need. This function reports timing
Expand Down
40 changes: 40 additions & 0 deletions benchmark/async_hooks/http-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
'use strict';
const common = require('../common.js');

const bench = common.createBenchmark(main, {
asyncHooks: ['init', 'before', 'after', 'all', 'disabled', 'none'],
connections: [50, 500]
});

function main({ asyncHooks, connections }) {
if (asyncHooks !== 'none') {
let hooks = {
init() {},
before() {},
after() {},
destroy() {},
promiseResolve() {}
};
if (asyncHooks !== 'all' || asyncHooks !== 'disabled') {
hooks = {
[asyncHooks]: () => {}
};
}
const hook = require('async_hooks').createHook(hooks);
if (asyncHooks !== 'disabled') {
hook.enable();
}
}
const server = require('../fixtures/simple-http-server.js')
.listen(common.PORT)
.on('listening', () => {
const path = '/buffer/4/4/normal/1';

bench.http({
connections,
path,
}, () => {
server.close();
});
});
}
2 changes: 1 addition & 1 deletion benchmark/child_process/child-process-exec-stdout.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function childProcessExecStdout({ dur, len }) {
const cmd = `yes "${'.'.repeat(len)}"`;
const child = exec(cmd, { 'stdio': ['ignore', 'pipe', 'ignore'] });

var bytes = 0;
let bytes = 0;
child.stdout.on('data', (msg) => {
bytes += msg.length;
});
Expand Down
2 changes: 1 addition & 1 deletion benchmark/child_process/child-process-read-ipc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (process.argv[2] === 'child') {
const child = spawn(process.argv[0],
[process.argv[1], 'child', len], options);

var bytes = 0;
let bytes = 0;
child.on('message', (msg) => { bytes += msg.length; });

setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/child_process/child-process-read.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function main({ dur, len }) {
const options = { 'stdio': ['ignore', 'pipe', 'ignore'] };
const child = child_process.spawn('yes', [msg], options);

var bytes = 0;
let bytes = 0;
child.stdout.on('data', (msg) => {
bytes += msg.length;
});
Expand Down
17 changes: 8 additions & 9 deletions benchmark/cluster/echo.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ if (cluster.isMaster) {
serialization
}) {
const expectedPerBroadcast = sendsPerBroadcast * workers;
var readies = 0;
var broadcasts = 0;
var msgCount = 0;
var data;
let readies = 0;
let broadcasts = 0;
let msgCount = 0;
let data;

cluster.settings.serialization = serialization;

Expand All @@ -37,7 +37,7 @@ if (cluster.isMaster) {
throw new Error('Unsupported payload type');
}

for (var i = 0; i < workers; ++i)
for (let i = 0; i < workers; ++i)
cluster.fork().on('online', onOnline).on('message', onMessage);

function onOnline() {
Expand All @@ -48,16 +48,15 @@ if (cluster.isMaster) {
}

function broadcast() {
var id;
if (broadcasts++ === n) {
bench.end(n);
for (id in cluster.workers)
for (const id in cluster.workers)
cluster.workers[id].disconnect();
return;
}
for (id in cluster.workers) {
for (const id in cluster.workers) {
const worker = cluster.workers[id];
for (var i = 0; i < sendsPerBroadcast; ++i)
for (let i = 0; i < sendsPerBroadcast; ++i)
worker.send(data);
}
}
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 @@ -25,7 +25,7 @@ function AEAD_Bench(cipher, message, associate_data, key, iv, n, len) {
const bits = written * 8;
const mbits = bits / (1024 * 1024);

for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
const alice = crypto.createCipheriv(cipher, key, iv);
alice.setAAD(associate_data);
const enc = alice.update(message);
Expand Down
12 changes: 6 additions & 6 deletions benchmark/crypto/cipher-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function main({ api, cipher, type, len, writes }) {
const alice_cipher = crypto.createCipher(cipher, alice_secret);
const bob_cipher = crypto.createDecipher(cipher, bob_secret);

var message;
var encoding;
let message;
let encoding;
switch (type) {
case 'asc':
message = 'a'.repeat(len);
Expand All @@ -65,7 +65,7 @@ function main({ api, cipher, type, len, writes }) {
}

function streamWrite(alice, bob, message, encoding, writes) {
var written = 0;
let written = 0;
bob.on('data', (c) => {
written += c.length;
});
Expand All @@ -86,9 +86,9 @@ function streamWrite(alice, bob, message, encoding, writes) {
}

function legacyWrite(alice, bob, message, encoding, writes) {
var written = 0;
var enc, dec;
for (var i = 0; i < writes; i++) {
let written = 0;
let enc, dec;
for (let i = 0; i < writes; i++) {
enc = alice.update(message, encoding);
dec = bob.update(enc);
written += dec.length;
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 @@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, {

function main({ n, v }) {
const method = require(v).getCiphers;
var i = 0;
let i = 0;
// First call to getCiphers will dominate the results
if (n > 1) {
for (; i < n; i++)
Expand Down
6 changes: 3 additions & 3 deletions benchmark/crypto/hash-stream-creation.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function main({ api, type, len, out, writes, algo }) {
api = 'legacy';
}

var message;
var encoding;
let message;
let encoding;
switch (type) {
case 'asc':
message = 'a'.repeat(len);
Expand Down Expand Up @@ -52,7 +52,7 @@ function legacyWrite(algo, message, encoding, writes, len, outEnc) {
while (writes-- > 0) {
const h = crypto.createHash(algo);
h.update(message, encoding);
var res = h.digest(outEnc);
let res = h.digest(outEnc);

// Include buffer creation costs for older versions
if (outEnc === 'buffer' && typeof res === 'string')
Expand Down
4 changes: 2 additions & 2 deletions benchmark/crypto/hash-stream-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function main({ api, type, len, algo, writes }) {
api = 'legacy';
}

var message;
var encoding;
let message;
let encoding;
switch (type) {
case 'asc':
message = 'a'.repeat(len);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/crypto/rsa-encrypt-decrypt-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function StreamWrite(algo, keylen, message, n, len) {

const privateKey = RSA_PrivatePem[keylen];
const publicKey = RSA_PublicPem[keylen];
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
const enc = crypto.privateEncrypt(privateKey, message);
crypto.publicDecrypt(publicKey, enc);
}
Expand Down
8 changes: 4 additions & 4 deletions benchmark/dgram/array-vs-concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ const bench = common.createBenchmark(main, {

function main({ dur, len, num, type, chunks }) {
const chunk = [];
for (var i = 0; i < chunks; i++) {
for (let i = 0; i < chunks; i++) {
chunk.push(Buffer.allocUnsafe(Math.round(len / chunks)));
}

// Server
var sent = 0;
let sent = 0;
const socket = dgram.createSocket('udp4');
const onsend = type === 'concat' ? onsendConcat : onsendMulti;

Expand All @@ -32,7 +32,7 @@ function main({ dur, len, num, type, chunks }) {
// The setImmediate() is necessary to have event loop progress on OSes
// that only perform synchronous I/O on nonblocking UDP sockets.
setImmediate(() => {
for (var i = 0; i < num; i++) {
for (let i = 0; i < num; i++) {
socket.send(Buffer.concat(chunk), PORT, '127.0.0.1', onsend);
}
});
Expand All @@ -44,7 +44,7 @@ function main({ dur, len, num, type, chunks }) {
// The setImmediate() is necessary to have event loop progress on OSes
// that only perform synchronous I/O on nonblocking UDP sockets.
setImmediate(() => {
for (var i = 0; i < num; i++) {
for (let i = 0; i < num; i++) {
socket.send(chunk, PORT, '127.0.0.1', onsend);
}
});
Expand Down
Loading