Version
19.7.0
Platform
Darwin midnight.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:06:26 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8112 arm64
Subsystem
perf_hooks
What steps will reproduce the bug?
node -e "require('perf_hooks').performance.mark()"
How often does it reproduce? Is there a required condition?
This works fine in Node <19 but throws an error in Node 19.
What is the expected behavior? Why is that the expected behavior?
name is marked as an optional parameter in the docs. I expect no error when calling mark() without a name parameter.
What do you see instead?
❯ node -e "require('perf_hooks').performance.mark()"
node:internal/perf/performance:125
throw new ERR_MISSING_ARGS('name');
^
TypeError [ERR_MISSING_ARGS]: The "name" argument must be specified
at new NodeError (node:internal/errors:399:5)
at Performance.mark (node:internal/perf/performance:125:13)
at [eval]:1:35
at Script.runInThisContext (node:vm:128:12)
at Object.runInThisContext (node:vm:306:38)
at node:internal/process/execution:83:21
at [eval]-wrapper:6:24
at runScript (node:internal/process/execution:82:62)
at evalScript (node:internal/process/execution:104:10)
at node:internal/main/eval_string:50:3 {
code: 'ERR_MISSING_ARGS'
}
Node.js v19.7.0
Additional information
No response
Version
19.7.0
Platform
Darwin midnight.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:06:26 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8112 arm64
Subsystem
perf_hooks
What steps will reproduce the bug?
node -e "require('perf_hooks').performance.mark()"How often does it reproduce? Is there a required condition?
This works fine in Node <19 but throws an error in Node 19.
What is the expected behavior? Why is that the expected behavior?
nameis marked as an optional parameter in the docs. I expect no error when callingmark()without a name parameter.What do you see instead?
Additional information
No response