nodejs/lib/perf_hooks.js
Antoine du Hamel 06d8606960
lib: use null-prototype objects for property descriptors
Refs: https://github.com/nodejs/node/pull/42921

PR-URL: https://github.com/nodejs/node/pull/43270
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-06-03 09:23:58 +01:00

47 lines
1.0 KiB
JavaScript

'use strict';
const {
ObjectDefineProperty,
} = primordials;
const {
constants,
} = internalBinding('performance');
const { PerformanceEntry } = require('internal/perf/performance_entry');
const { PerformanceResourceTiming } = require('internal/perf/resource_timing');
const {
PerformanceObserver,
PerformanceObserverEntryList,
} = require('internal/perf/observe');
const {
PerformanceMark,
PerformanceMeasure,
} = require('internal/perf/usertiming');
const { InternalPerformance } = require('internal/perf/performance');
const {
createHistogram
} = require('internal/histogram');
const monitorEventLoopDelay = require('internal/perf/event_loop_delay');
module.exports = {
PerformanceEntry,
PerformanceMark,
PerformanceMeasure,
PerformanceObserver,
PerformanceObserverEntryList,
PerformanceResourceTiming,
monitorEventLoopDelay,
createHistogram,
performance: new InternalPerformance(),
};
ObjectDefineProperty(module.exports, 'constants', {
__proto__: null,
configurable: false,
enumerable: true,
value: constants
});