Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: expose performance interface to global #32790

Closed

Conversation

juanarbol
Copy link
Member

May fix: #28635

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@addaleax addaleax added semver-major PRs that contain breaking changes and should be released in the next major version. perf_hooks Issues and PRs related to the implementation of the Performance Timing API. labels Apr 12, 2020
@@ -125,6 +125,10 @@ if (!config.noBrowserGlobals) {
// https://url.spec.whatwg.org/#urlsearchparams
exposeInterface(global, 'URLSearchParams', URLSearchParams);

const { performance } = require('perf_hooks');
// https://www.w3.org/TR/performance-timeline/
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// https://www.w3.org/TR/performance-timeline/
// https://www.w3.org/TR/performance-timeline/
// https://www.w3.org/TR/hr-time-2/

Copy link
Member

Choose a reason for hiding this comment

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

@joyeecheung
Copy link
Member

joyeecheung commented May 1, 2020

quoting my comments in #28635 (comment)

I think it would be good to at least import https://github.com/web-platform-tests/wpt/tree/master/performance-timeline and figure out the difference between the Web before moving this to global, considering people could very well use the same code as how they would use it on the Web and run into differences (which could either be bugs or just wontfix). It would also be good to figure out the subset of performance timeline we want to implement and what we explicitly won't.

@jasnell
Copy link
Member

jasnell commented May 1, 2020

+1 to what @joyeecheung said.

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

This should also expose PerformanceObserver

targos added a commit to targos/node that referenced this pull request May 7, 2020
@targos
Copy link
Member

targos commented May 7, 2020

I'm looking at the spec for PerformanceObserver.observe and our implementation is missing a few things to be compliant.
I could work on improving it but I'd like to ask @jasnell if that's something we want (maybe we are not spec-compliant for a reason that I don't know about)?

@jasnell
Copy link
Member

jasnell commented May 7, 2020

That depends on the specific pieces you're seeing but the short version is: we're intentionally not fully compliant because the specs written includes a built-in memory leak that we are avoiding.

@targos
Copy link
Member

targos commented May 7, 2020

I don't know what you are referring to, but the first thing I noted is that we support the entryTypes option but not the type one.

@jasnell
Copy link
Member

jasnell commented May 7, 2020

I could be mistaken but type I believe, was added after the implementation was done. Either way it would be good to add that one

targos added a commit to targos/node that referenced this pull request May 7, 2020
targos added a commit that referenced this pull request May 10, 2020
Refs: #32790

PR-URL: #33287
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
codebytere pushed a commit that referenced this pull request May 11, 2020
Refs: #32790

PR-URL: #33287
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@juanarbol
Copy link
Member Author

Performance API seems to need more love (hopefully I could help to stabilize this) and semver major cut was few weeks ago. I better close this PR.

@juanarbol juanarbol closed this May 13, 2020
@juanarbol
Copy link
Member Author

Oh, sorry, I see activity related to this.

@juanarbol juanarbol reopened this May 13, 2020
@BridgeAR BridgeAR force-pushed the master branch 2 times, most recently from 8ae28ff to 2935f72 Compare May 31, 2020 12:18
codebytere pushed a commit that referenced this pull request Jun 7, 2020
Refs: #32790

PR-URL: #33287
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@juanarbol
Copy link
Member Author

Closing due inactivity

@juanarbol juanarbol closed this Jul 21, 2020
@juanarbol juanarbol deleted the juanarbol/expose-performance-global branch January 19, 2021 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf_hooks Issues and PRs related to the implementation of the Performance Timing API. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

perf_hooks: expose performance global
6 participants