Skip to content

Does not work in node 16, TypeError: perf.getEntriesByName is not a function #18

@patrickhulce

Description

@patrickhulce

In node 16, performance is a global with the mark method (so the hrtime path isn't used), but it does not have getEntriesByName (so marky.stop throws an exception). Feature detection is now necessary for all the performance methods used :/

if (perf && perf.mark) {

Originally surfaced in GoogleChrome/lighthouse-ci#596

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions