-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
perf_hooks.PerformanceObserver.observe kills node.js 16.0.0 when registering same entryTypes twice #38412
Comments
/cc @jasnell |
PR incoming |
Signed-off-by: James M Snell <jasnell@gmail.com> Fixes: nodejs#38412
Fix in #38414 ... Btw, the
Would now be
And the |
Signed-off-by: James M Snell <jasnell@gmail.com> Fixes: #38412 PR-URL: #38414 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Hi @jasnell, do you mind clarifying whether The v16 documentation still mentions obs.observe({ type: 'gc' }); // Observe a single type
obs.observe({ entryTypes: ['gc'] }); // Observe one or more types The former is Node >= 16, while the latter is supported by earlier versions. For a library that wants to support multiple versions, it's simpler to use I looked ad MDN and this spec, both of them mention either Thanks! |
What steps will reproduce the bug?
The easiest way is to clone siimon/prom-client (13.1.0 or current master branch) and run unit tests.
The minimum use case I could find is this code - I don't know or use perf_tools myself, but I can confirm this snippet works in Node.js 14.x
How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior?
All prom-client unit tests pass like in node.js 14 or 15.
What do you see instead?
Under Debian:
Under Windows:
The text was updated successfully, but these errors were encountered: