performanceNodeTiming.uvMetricsInfoBigInt


  • 类型:<Object>
    • loopCount <bigint> 事件循环迭代次数。
    • events <bigint> 事件处理器已处理的事件数量。
    • eventsWaiting <bigint> 在调用事件提供程序时,正在等待处理的事件数量。

跟 performanceNodeTiming.uvMetricsInfo 一样,只是这些值是 <bigint>,承载 libuv 报告的完整 64 位范围。

🌐 The same as performanceNodeTiming.uvMetricsInfo, except that the values are <bigint>s carrying the full 64-bit range reported by libuv.

因为 JSON.stringify() 无法序列化 <bigint> 值,所以这个属性不可枚举,也不会包含在 performanceNodeTiming.toJSON() 的输出中。例如,通过展开其可枚举属性创建的 performance.nodeTiming 副本仍然可以被序列化。

🌐 Because JSON.stringify() cannot serialize <bigint> values, this property is not enumerable and is not included in the output of performanceNodeTiming.toJSON(). Copies of performance.nodeTiming made by spreading its enumerable properties, for example, remain serializable.

const { performance } = require('node:perf_hooks');

setImmediate(() => {
  console.log(performance.nodeTiming.uvMetricsInfoBigInt);
});import { performance } from 'node:perf_hooks';

setImmediate(() => {
  console.log(performance.nodeTiming.uvMetricsInfoBigInt);
});