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 is not a function #21621

Closed
xueqingxiao opened this issue Jul 2, 2018 · 1 comment
Closed

performance.getEntriesByName is not a function #21621

xueqingxiao opened this issue Jul 2, 2018 · 1 comment
Labels
perf_hooks Issues and PRs related to the implementation of the Performance Timing API.

Comments

@xueqingxiao
Copy link

  • Version: V10.1.0
  • Platform: macOS 10.13.5
  • Subsystem:

code:

const { performance } = require('perf_hooks');
performance.mark('A');
setTimeout(() => {
  performance.mark('B');
  performance.measure('A to B', 'A', 'B');
  const entry = performance.getEntriesByName('A to B', 'measure');
  console.log(entry.duration);
}, 10000);

output:

TypeError: performance.getEntriesByName is not a function
    at Timeout.setTimeout [as _onTimeout] (repl:4:29)
    at ontimeout (timers.js:427:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10)
@targos targos added the perf_hooks Issues and PRs related to the implementation of the Performance Timing API. label Jul 2, 2018
@targos
Copy link
Member

targos commented Jul 2, 2018

This method was removed in v10.0.0.
See #19563

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.
Projects
None yet
Development

No branches or pull requests

2 participants