Skip to content

add perf_hooks module and global Performance classes#4992

Merged
anonrig merged 1 commit intomainfrom
yagiz/add-perf-hooks
Sep 10, 2025
Merged

add perf_hooks module and global Performance classes#4992
anonrig merged 1 commit intomainfrom
yagiz/add-perf-hooks

Conversation

@anonrig
Copy link
Copy Markdown
Member

@anonrig anonrig commented Sep 4, 2025

Adds node:perf_hooks module and several global Performance prefixed classes.

TODO

  • Tests
  • Update global performance under a different compat flag

@anonrig anonrig requested review from a team as code owners September 4, 2025 19:42
@anonrig anonrig requested a review from a team September 4, 2025 19:42
@anonrig anonrig requested a review from a team as a code owner September 4, 2025 19:42
@npaun
Copy link
Copy Markdown
Member

npaun commented Sep 4, 2025

What is this file? https://github.com/cloudflare/workerd/blob/f012c778b8176ec67b969dd779eb08b4f4653c50/src/node/internal/inter

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 4, 2025

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@anonrig
Copy link
Copy Markdown
Member Author

anonrig commented Sep 4, 2025

What is this file? https://github.com/cloudflare/workerd/blob/f012c778b8176ec67b969dd779eb08b4f4653c50/src/node/internal/inter

Symptom of my dying brain

@anonrig anonrig force-pushed the yagiz/add-perf-hooks branch 3 times, most recently from 07c2a76 to c5dffd5 Compare September 4, 2025 19:48
@jasnell
Copy link
Copy Markdown
Collaborator

jasnell commented Sep 5, 2025

Looks like there's a fair amount of non-related changes (adding the copyright headers). Any chance those could be put in a separate commit so the actual perf_hooks changes can be looked a individually?

Copy link
Copy Markdown
Collaborator

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall good, definitely a few more todos.

@anonrig anonrig force-pushed the yagiz/add-perf-hooks branch 2 times, most recently from 058d813 to b277613 Compare September 5, 2025 15:51
@anonrig anonrig force-pushed the yagiz/add-perf-hooks branch 2 times, most recently from d56ea88 to 243968a Compare September 8, 2025 20:06
@anonrig anonrig force-pushed the yagiz/add-perf-hooks branch from cd3b469 to f856d3b Compare September 9, 2025 20:16
@anonrig anonrig requested a review from jasnell September 9, 2025 20:16
@jasnell
Copy link
Copy Markdown
Collaborator

jasnell commented Sep 9, 2025

Looks like the type snapshots also need to be regenerated.

@anonrig anonrig force-pushed the yagiz/add-perf-hooks branch from f856d3b to 3042560 Compare September 9, 2025 21:49
@anonrig anonrig requested a review from a team as a code owner September 9, 2025 21:49
@jasnell
Copy link
Copy Markdown
Collaborator

jasnell commented Sep 9, 2025

Ok, three items remaining:

  • The additional compat flag for gating exposure of the new Performance* classes on global-scope.h
  • Handling the issue with the getEventCounts() return value. I think it's better to stub out the class.
  • Rebasing

@anonrig anonrig force-pushed the yagiz/add-perf-hooks branch from 4a11bdd to ffa66ec Compare September 10, 2025 13:36
@anonrig anonrig requested a review from jasnell September 10, 2025 13:36
@anonrig anonrig changed the title add perf_hooks module add perf_hooks module and global Performance classes Sep 10, 2025
@anonrig anonrig force-pushed the yagiz/add-perf-hooks branch from ffa66ec to 63dc214 Compare September 10, 2025 16:06
@anonrig
Copy link
Copy Markdown
Member Author

anonrig commented Sep 10, 2025

Rebased and force pushed.

@anonrig anonrig merged commit abd3d4f into main Sep 10, 2025
32 of 34 checks passed
@anonrig anonrig deleted the yagiz/add-perf-hooks branch September 10, 2025 17:20
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.

4 participants