Skip to content

perf_hooks: add missing resource timing attributes - #65017

Merged
nodejs-github-bot merged 5 commits into
nodejs:mainfrom
greenheadHQ:resource-timing-missing-getters
Sep 2, 2026
Merged

perf_hooks: add missing resource timing attributes#65017
nodejs-github-bot merged 5 commits into
nodejs:mainfrom
greenheadHQ:resource-timing-missing-getters

Conversation

@greenheadHQ

@greenheadHQ greenheadHQ commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Add the PerformanceResourceTiming attributes from the Resource Timing specification that are still missing in Node.js: finalResponseHeadersStart, firstInterimResponseStart, renderBlockingStatus, contentType, and contentEncoding.

The new getters follow the existing PerformanceResourceTiming pattern and are included in toJSON(). The WPT status file is updated to enable the ten idlharness subtests that now pass.

Update responseStart to return firstInterimResponseStart when it is non-zero and fall back to finalResponseHeadersStart otherwise, matching the Resource Timing specification.

Tests cover the new getters, default and supplied metadata, the interim = 0, final > 0 fallback, and an entry created by the built-in fetch() implementation.

Refs: #51589

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/web-standards

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Aug 4, 2026
@greenheadHQ
greenheadHQ force-pushed the resource-timing-missing-getters branch 2 times, most recently from 2ebef57 to 94dca40 Compare August 4, 2026 14:47
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.06%. Comparing base (f9ab994) to head (86667e4).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65017      +/-   ##
==========================================
- Coverage   90.07%   90.06%   -0.02%     
==========================================
  Files         754      754              
  Lines      256395   256434      +39     
  Branches    48494    48507      +13     
==========================================
+ Hits       230947   230950       +3     
- Misses      16563    16584      +21     
- Partials     8885     8900      +15     
Files with missing lines Coverage Δ
lib/internal/perf/resource_timing.js 99.67% <100.00%> (+0.04%) ⬆️

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greenheadHQ

Copy link
Copy Markdown
Contributor Author

Hello @legendecas @jasnell 🖐️

Thank you for all the work that goes into reviewing contributions here! Just a gentle ping in case this PR slipped through the cracks. I would appreciate any feedback whenever you have time, no rush at all. Thanks!

Comment thread doc/api/perf_hooks.md Outdated
@daeyeon

daeyeon commented Sep 1, 2026

Copy link
Copy Markdown
Member

The CI failures persist after a rerun and seem unrelated to the latest changes. Perhaps updating the branch would trigger a fresh CI run.

greenheadHQ and others added 5 commits September 1, 2026 21:39
Add the finalResponseHeadersStart, firstInterimResponseStart,
renderBlockingStatus, contentType and contentEncoding getters to
PerformanceResourceTiming and update the WPT status accordingly.

Signed-off-by: greenhead <shren0812@gmail.com>
The spec defines responseStart as firstInterimResponseStart when that
is not 0, and finalResponseHeadersStart otherwise.

Signed-off-by: greenhead <greenheadhq@gmail.com>
Document the five getters PerformanceResourceTiming gained:
finalResponseHeadersStart, firstInterimResponseStart,
renderBlockingStatus, contentType and contentEncoding, add the missing
responseStart entry, and record its new interim-aware behavior.

Signed-off-by: greenhead <greenheadhq@gmail.com>
Signed-off-by: greenhead <greenheadhq@gmail.com>
Signed-off-by: greenhead <greenheadhq@gmail.com>
@greenheadHQ
greenheadHQ force-pushed the resource-timing-missing-getters branch from e0e7844 to 86667e4 Compare September 1, 2026 13:13
@daeyeon daeyeon added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. labels Sep 1, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 1, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@legendecas legendecas added perf_hooks Issues and PRs related to the perf_hooks module and performance measurement APIs. commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 2, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 2, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Commit Queue failed

This pull request has multiple commits, but no landing policy was selected.

Add commit-queue-squash PRs the Commit Queue should land as one squashed commit. to land it as one commit, or commit-queue-rebase PRs the Commit Queue should land as multiple self-contained commits. to land the commits separately.

The pull request was removed from the Commit Queue and labeled commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. . After resolving the failure, remove that label and add commit-queue PRs queued for automated landing through the Commit Queue. to retry.

Full Commit Queue output
- Loading data for nodejs/node/pull/65017
✔  Done loading data for nodejs/node/pull/65017
----------------------------------- PR info ------------------------------------
Title      perf_hooks: add missing resource timing attributes (#65017)
Author     greenhead <greenheadhq@gmail.com> (@greenheadHQ)
Branch     greenheadHQ:resource-timing-missing-getters -> nodejs:main
Labels     author ready, perf_hooks, needs-ci, commit-queue
Commits    5
 - perf_hooks: add missing resource timing attributes
 - perf_hooks: align responseStart with the spec
 - doc: add resource timing attribute entries
 - perf_hooks: test resource timing fetch integration
 - doc: remove fetch-specific resource timing notes
Committers 1
 - greenhead <greenheadhq@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65017
Refs: https://github.com/nodejs/node/pull/51589
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/65017
Refs: https://github.com/nodejs/node/pull/51589
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Tue, 04 Aug 2026 14:15:41 GMT
   ✔  Approvals: 2
   ✔  - Daeyeon Jeong (@daeyeon): https://github.com/nodejs/node/pull/65017#pullrequestreview-5084118622
   ✔  - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/65017#pullrequestreview-5090843746
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2026-09-01T23:39:01Z: https://ci.nodejs.org/job/node-test-pull-request/76864/
- Querying data for job/node-test-pull-request/76864/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
   26bd28cbdb..b0afbf5f0b  main       -> origin/main
✔  origin/main is now up-to-date
main is out of sync with origin/main. Mismatched commits:
 - 4867d306b4 tools: do not hardcode path to Ruff
 - b0afbf5f0b tools: do not hardcode path to Ruff
--------------------------------------------------------------------------------
HEAD is now at b0afbf5f0b tools: do not hardcode path to Ruff
   ✔  Reset to origin/main
- Downloading patch for 65017
From https://github.com/nodejs/node
 * branch                  refs/pull/65017/merge -> FETCH_HEAD
✔  Fetched commits as 26bd28cbdb1c..86667e421f23
--------------------------------------------------------------------------------
[main b682d5a3cd] perf_hooks: add missing resource timing attributes
 Author: greenhead <shren0812@gmail.com>
 Date: Tue Aug 4 23:15:21 2026 +0900
 4 files changed, 156 insertions(+), 13 deletions(-)
 create mode 100644 test/parallel/test-perf-hooks-resourcetiming-attributes.js
[main f2b499812a] perf_hooks: align responseStart with the spec
 Author: greenhead <greenheadhq@gmail.com>
 Date: Wed Aug 26 23:15:45 2026 +0900
 2 files changed, 8 insertions(+), 2 deletions(-)
[main fd70fc58a8] doc: add resource timing attribute entries
 Author: greenhead <greenheadhq@gmail.com>
 Date: Wed Aug 26 23:15:45 2026 +0900
 1 file changed, 86 insertions(+)
[main 8edb1cf03e] perf_hooks: test resource timing fetch integration
 Author: greenhead <greenheadhq@gmail.com>
 Date: Mon Aug 31 20:31:57 2026 +0900
 3 files changed, 89 insertions(+), 11 deletions(-)
 create mode 100644 test/parallel/test-perf-hooks-resourcetiming-fetch.mjs
[main 7d1ebfc739] doc: remove fetch-specific resource timing notes
 Author: greenhead <greenheadhq@gmail.com>
 Date: Mon Aug 31 22:51:02 2026 +0900
 1 file changed, 4 insertions(+), 11 deletions(-)
   ✔  Patches applied
There are 5 commits in the PR. Attempting autorebase.
(node:818) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Rebasing (2/10)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
perf_hooks: add missing resource timing attributes

Add the finalResponseHeadersStart, firstInterimResponseStart,
renderBlockingStatus, contentType and contentEncoding getters to
PerformanceResourceTiming and update the WPT status accordingly.

Signed-off-by: greenhead <shren0812@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65017
Refs: https://github.com/nodejs/node/pull/51589
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
--------------------------------------------------------------------------------
[detached HEAD 1bae6705ac] perf_hooks: add missing resource timing attributes
 Author: greenhead <shren0812@gmail.com>
 Date: Tue Aug 4 23:15:21 2026 +0900
 4 files changed, 156 insertions(+), 13 deletions(-)
 create mode 100644 test/parallel/test-perf-hooks-resourcetiming-attributes.js
Rebasing (3/10)
Rebasing (4/10)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
perf_hooks: align responseStart with the spec

The spec defines responseStart as firstInterimResponseStart when that
is not 0, and finalResponseHeadersStart otherwise.

Signed-off-by: greenhead <greenheadhq@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65017
Refs: https://github.com/nodejs/node/pull/51589
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
--------------------------------------------------------------------------------
[detached HEAD 0bd0a119b4] perf_hooks: align responseStart with the spec
 Author: greenhead <greenheadhq@gmail.com>
 Date: Wed Aug 26 23:15:45 2026 +0900
 2 files changed, 8 insertions(+), 2 deletions(-)
Rebasing (5/10)
Rebasing (6/10)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
doc: add resource timing attribute entries

Document the five getters PerformanceResourceTiming gained:
finalResponseHeadersStart, firstInterimResponseStart,
renderBlockingStatus, contentType and contentEncoding, add the missing
responseStart entry, and record its new interim-aware behavior.

Signed-off-by: greenhead <greenheadhq@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65017
Refs: https://github.com/nodejs/node/pull/51589
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
--------------------------------------------------------------------------------
[detached HEAD a1e5fe7201] doc: add resource timing attribute entries
 Author: greenhead <greenheadhq@gmail.com>
 Date: Wed Aug 26 23:15:45 2026 +0900
 1 file changed, 86 insertions(+)
Rebasing (7/10)
Rebasing (8/10)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
perf_hooks: test resource timing fetch integration

Signed-off-by: greenhead <greenheadhq@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65017
Refs: https://github.com/nodejs/node/pull/51589
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
--------------------------------------------------------------------------------
[detached HEAD 7379146bb7] perf_hooks: test resource timing fetch integration
 Author: greenhead <greenheadhq@gmail.com>
 Date: Mon Aug 31 20:31:57 2026 +0900
 3 files changed, 89 insertions(+), 11 deletions(-)
 create mode 100644 test/parallel/test-perf-hooks-resourcetiming-fetch.mjs
Rebasing (9/10)
Rebasing (10/10)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
doc: remove fetch-specific resource timing notes

Signed-off-by: greenhead <greenheadhq@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65017
Refs: https://github.com/nodejs/node/pull/51589
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
--------------------------------------------------------------------------------
[detached HEAD 7632502ff7] doc: remove fetch-specific resource timing notes
 Author: greenhead <greenheadhq@gmail.com>
 Date: Mon Aug 31 22:51:02 2026 +0900
 1 file changed, 4 insertions(+), 11 deletions(-)
Successfully rebased and updated refs/heads/main.
--------------------------------------------------------------------------------
   ℹ  Add `commit-queue-squash` label to land the PR as one commit, or `commit-queue-rebase` to land as separate commits.

View workflow run

@daeyeon daeyeon added commit-queue-squash PRs the Commit Queue should land as one squashed commit. commit-queue PRs queued for automated landing through the Commit Queue. and removed commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. labels Sep 2, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 5b912ed into nodejs:main Sep 2, 2026
92 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 5b912ed

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-squash PRs the Commit Queue should land as one squashed commit. needs-ci PRs that need a full CI run. perf_hooks Issues and PRs related to the perf_hooks module and performance measurement APIs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants