Skip to content

perf_hooks: add PerformanceEntry id and navigationId - #64898

Open
HoonDongKang wants to merge 1 commit into
nodejs:mainfrom
HoonDongKang:fix-performance-entry-id
Open

perf_hooks: add PerformanceEntry id and navigationId#64898
HoonDongKang wants to merge 1 commit into
nodejs:mainfrom
HoonDongKang:fix-performance-entry-id

Conversation

@HoonDongKang

Copy link
Copy Markdown
Contributor

This adds PerformanceEntry.prototype.id and PerformanceEntry.prototype.navigationId to match the Performance Timeline IDL.

Entries are assigned an id when they are queued, following the Performance Timeline Queue a PerformanceEntry algorithm. navigationId is initialized to 0; Node.js does not currently track a Document-associated most recent navigation for perf_hooks entries.

This also updates the performance-timeline WPT status now that idlharness.any.js passes for these attributes.

Refs:

Tests

out/Release/node test/wpt/test-performance-timeline.js idlharness.any.js
out/Release/node test/parallel/test-perf-hooks-usertiming.js
out/Release/node test/parallel/test-perf-hooks-resourcetiming.js
Files: 1/1 ran, 1 passed, 0 skipped, 0 expected failures, 0 unexpected failures, 0 unexpected passes
Subtests: 58 passed, 0 skipped, 0 expected failures, 0 unexpected failures, 0 unexpected passes

Add the PerformanceEntry id and navigationId attributes required by the
Performance Timeline IDL. Entries get an id when queued, following the
Performance Timeline queueing algorithm.

Update the performance-timeline WPT status now that idlharness.any.js
passes for these attributes.

Refs: https://w3c.github.io/performance-timeline/#performanceentry
Refs: https://w3c.github.io/performance-timeline/#queue-a-performanceentry
Refs: https://w3c.github.io/performance-timeline/#generate-a-performance-entry-id

Signed-off-by: HoonDongKang <d159123@naver.com>
@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 1, 2026
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.13%. Comparing base (a6a1bd4) to head (73ad3f4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64898      +/-   ##
==========================================
- Coverage   90.14%   90.13%   -0.01%     
==========================================
  Files         746      746              
  Lines      242846   242881      +35     
  Branches    45771    45772       +1     
==========================================
+ Hits       218909   218931      +22     
- Misses      15439    15441       +2     
- Partials     8498     8509      +11     
Files with missing lines Coverage Δ
lib/internal/perf/observe.js 91.46% <100.00%> (+0.04%) ⬆️
lib/internal/perf/performance_entry.js 91.86% <100.00%> (+1.86%) ⬆️

... and 24 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants