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

performance.getEntriesByName ignores optional type argument #54766

Closed
luketaher opened this issue Sep 4, 2024 · 0 comments · Fixed by #54767
Closed

performance.getEntriesByName ignores optional type argument #54766

luketaher opened this issue Sep 4, 2024 · 0 comments · Fixed by #54767
Labels
perf_hooks Issues and PRs related to the implementation of the Performance Timing API. web-standards Issues and PRs related to Web APIs

Comments

@luketaher
Copy link
Contributor

Version

v16.7.0 - v22.7.0

Platform

Darwin x86_64

Subsystem

perf_hooks

What steps will reproduce the bug?

Executing this script:

performance.mark('test');
performance.measure('test');

const markEntries = performance.getEntriesByName('test', 'mark');

console.log(markEntries);

How often does it reproduce? Is there a required condition?

100% of the time

What is the expected behavior? Why is that the expected behavior?

As per:

The expected behaviour is:

[
  PerformanceMark {
    name: 'test',
    entryType: 'mark',
    ...
  }
]

What do you see instead?

[
  PerformanceMeasure {
    name: 'test',
    entryType: 'measure',
    ...
  },
  PerformanceMark {
    name: 'test',
    entryType: 'mark',
    ...
  }
]

Additional information

This bug appears to have existed since performance.getEntriesByName was added as part of performance timeline spec compliance in v16.7.0.

#39297 introduced performance.getEntriesByName without a type argument. While the type argument was subsequently added to the underlying observe.getEntriesByName method in #39532, it was never passed through by performance.getEntriesByName.

luketaher added a commit to luketaher/node that referenced this issue Sep 4, 2024
@avivkeller avivkeller added perf_hooks Issues and PRs related to the implementation of the Performance Timing API. web-standards Issues and PRs related to Web APIs labels Sep 4, 2024
nodejs-github-bot pushed a commit that referenced this issue Sep 24, 2024
Fixes: #54766
PR-URL: #54767
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this issue Oct 4, 2024
Fixes: #54766
PR-URL: #54767
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
louwers pushed a commit to louwers/node that referenced this issue Nov 2, 2024
marco-ippolito pushed a commit that referenced this issue Nov 16, 2024
Fixes: #54766
PR-URL: #54767
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
marco-ippolito pushed a commit that referenced this issue Nov 17, 2024
Fixes: #54766
PR-URL: #54767
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
tpoisseau pushed a commit to tpoisseau/node that referenced this issue Nov 21, 2024
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. web-standards Issues and PRs related to Web APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants