-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
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
20
Platform
Mac
Subsystem
perf_hooks
What steps will reproduce the bug?
const { performance, PerformanceObserver } = require('perf_hooks');
const perfObserver = new PerformanceObserver((items) => {
const entries = items.getEntries();
entries.forEach((entry) => console.log(entry));
});
perfObserver.observe({ entryTypes: ['measure'] });
performance.mark(`sample-start`);
console.log('doing some work...');
performance.mark('sample-end');
performance.measure('sample', {
start: 'sample-start',
end: 'sample-end',
detail: { some: 'data' },
});
How often does it reproduce? Is there a required condition?
Reproduces consistently
What is the expected behavior? Why is that the expected behavior?
The expected output-
doing some work...
PerformanceMeasure {
name: 'sample',
entryType: 'measure',
startTime: 8.93499899105882,
duration: 6.525000999999975,
detail: { some: 'data' }
}
What do you see instead?
doing some work...
PerformanceMeasure {
name: 'sample',
entryType: 'measure',
startTime: 8.93499899105882,
duration: 6.525000999999975,
}
Additional information
Works well when using Node V18
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.