Skip to content

performance.getEntriesByName is not a function #21621

@xueqingxiao

Description

@xueqingxiao
  • 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    perf_hooksIssues and PRs related to the implementation of the Performance Timing API.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions