2017-08-07 15:53:24 -07:00
|
|
|
'use strict';
|
|
|
|
|
2019-11-22 18:04:46 +01:00
|
|
|
const {
|
|
|
|
ObjectDefineProperty,
|
|
|
|
} = primordials;
|
2019-04-09 09:55:53 +02:00
|
|
|
|
2017-08-07 15:53:24 -07:00
|
|
|
const {
|
2019-02-01 01:04:44 +08:00
|
|
|
constants,
|
2018-07-30 01:34:51 -07:00
|
|
|
} = internalBinding('performance');
|
2017-08-07 15:53:24 -07:00
|
|
|
|
2021-06-09 00:03:19 +08:00
|
|
|
const { PerformanceEntry } = require('internal/perf/performance_entry');
|
2021-01-28 16:34:27 -08:00
|
|
|
const { PerformanceObserver } = require('internal/perf/observe');
|
2021-06-09 00:03:19 +08:00
|
|
|
const { PerformanceMark } = require('internal/perf/usertiming');
|
|
|
|
const { InternalPerformance } = require('internal/perf/performance');
|
2019-03-19 18:17:49 +08:00
|
|
|
|
2020-02-27 13:14:38 -08:00
|
|
|
const {
|
2021-01-28 16:34:27 -08:00
|
|
|
createHistogram
|
2020-02-27 13:14:38 -08:00
|
|
|
} = require('internal/histogram');
|
|
|
|
|
2021-01-28 16:34:27 -08:00
|
|
|
const monitorEventLoopDelay = require('internal/perf/event_loop_delay');
|
2019-01-07 11:36:35 -08:00
|
|
|
|
2017-08-07 15:53:24 -07:00
|
|
|
module.exports = {
|
2021-01-28 16:34:27 -08:00
|
|
|
PerformanceEntry,
|
|
|
|
PerformanceMark,
|
2019-01-07 11:36:35 -08:00
|
|
|
PerformanceObserver,
|
2021-01-30 09:26:15 -08:00
|
|
|
monitorEventLoopDelay,
|
|
|
|
createHistogram,
|
2021-01-28 16:34:27 -08:00
|
|
|
performance: new InternalPerformance(),
|
2017-08-07 15:53:24 -07:00
|
|
|
};
|
|
|
|
|
2019-11-22 18:04:46 +01:00
|
|
|
ObjectDefineProperty(module.exports, 'constants', {
|
2017-08-07 15:53:24 -07:00
|
|
|
configurable: false,
|
|
|
|
enumerable: true,
|
|
|
|
value: constants
|
|
|
|
});
|