You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of node v16, performance is directly exposed under global.performance - nodejs/node#37970
One benefit of this change is that popular library @sinonjs/fake-timers only overrides the global performance object, and not perf_hooks.performance. So right now, users of this library need to explicitly mock out perf_hooks.performance (or just-performance.performance).
The text was updated successfully, but these errors were encountered:
Currently, this library uses the
just-performance
polyfill to get current time: https://github.com/jhurliman/node-rate-limiter/blob/25a866d/src/clock.tsAnd that polyfill loads performance from
perf_hooks
: https://github.com/jhurliman/just-performance/blob/main/src/node.tsAs of node v16,
performance
is directly exposed underglobal.performance
- nodejs/node#37970One benefit of this change is that popular library @sinonjs/fake-timers only overrides the global
performance
object, and notperf_hooks.performance
. So right now, users of this library need to explicitly mock outperf_hooks.performance
(orjust-performance.performance
).The text was updated successfully, but these errors were encountered: