-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
perf_hooksIssues and PRs related to the implementation of the Performance Timing API.Issues and PRs related to the implementation of the Performance Timing API.
Description
Version
v16.13.2、v17.5.0
Platform
Linux meixg-desktop 5.11.0-43-generic #47~20.04.2-Ubuntu SMP Mon Dec 13 11:06:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
perf_hooks
What steps will reproduce the bug?
performance.mark(undefined);
performance.mark('a');
const entries = performance.getEntriesByName(undefined);
console.log(entries);How often does it reproduce? Is there a required condition?
consistently
What is the expected behavior?
[
PerformanceMark {
name: 'undefined',
entryType: 'mark',
startTime: 74.92072999477386,
duration: 0,
detail: null
}
]
What do you see instead?
[
PerformanceMark {
name: 'undefined',
entryType: 'mark',
startTime: 74.92072999477386,
duration: 0,
detail: null
},
PerformanceMark {
name: 'a',
entryType: 'mark',
startTime: 75.06349003314972,
duration: 0,
detail: null
}
]
Additional information
Chrome、Safari will only output the 'undefined' one:
[PerformanceMark]
To retrieve all entries, we need to use .getEntries().
Metadata
Metadata
Assignees
Labels
perf_hooksIssues and PRs related to the implementation of the Performance Timing API.Issues and PRs related to the implementation of the Performance Timing API.