Skip to content

perf_hooks: lower PerformanceNodeTiming and the performance object's properties - #3609

Merged
ctate merged 2 commits into
mainfrom
ctate/perf-hooks-lower-d2ae75
Nov 12, 2026
Merged

ctate merged 2 commits into
mainfrom
ctate/perf-hooks-lower-d2ae75

Conversation

@ctate

@ctate ctate commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator
  • performance.nodeTiming now answers PerformanceNodeTiming's fields in Node's key order, toJSON(), stringify and inspection, with the live loop metrics and the startup milestones at 0; performance.toJSON(), supportedEntryTypes (one frozen list with Node's write errors) and the module's free eventLoopUtilization lower too, typed and through the dynamic tier.
  • 14 perf_hooks rows move off not-implemented (13 to partial, supportedEntryTypes to supported), with test evidence, and performance.eventLoopUtilization gains a third program.
  • Five differential corpus programs run against Node both ways, with recorded CI costs and TS7 order-parity baselines, and the limitations page states the startup milestones a compiled program cannot measure.

…properties

performance.nodeTiming answers PerformanceNodeTiming's own fields in Node's
key order (name, entryType, startTime, duration, the startup milestones,
the loop milestones, idleTime, uvMetricsInfo), its toJSON() and the JSON
stringify writes through it, inspection, and the missing runtime metrics:
scr_perf_loop.c gains the loopExit and loopCount getters the record and the
event-loop metrics read, and scr_json.c builds nodeTiming's JSON from
toJSON's field list.

PerformanceObserver.supportedEntryTypes is Node's fixed list as one frozen
static array: every read answers the same array, a checked-dynamic read
observes the same frozen array, and writes throw Node's TypeError messages.

performance.toJSON() answers nodeTiming, timeOrigin and the event-loop
utilization in Node's key order, and perf_hooks.eventLoopUtilization is the
module's free function over the same lowering as the method.

Adds corpus programs for the typed and JavaScript reads, the key orders,
toJSON, stringify, inspection, the frozen list and its write errors, and
the module's exports; the perf_hooks rows move from not-implemented to
partial, supportedEntryTypes to supported, and the docs limitations list
the startup milestones a compiled program cannot measure.
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scriptc Ready Ready Preview, v0 Nov 12, 2026 7:01pm UTC

Comment thread packages/runtime/src/scr_async.c Resolved
@ctate
ctate merged commit cabb74b into main Nov 12, 2026
30 checks passed
@ctate
ctate deleted the ctate/perf-hooks-lower-d2ae75 branch November 12, 2026 19:04

This branch was successfully deployed

1 active deployment
Preview — a7c7bcaf Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant