mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

- Move Performance and InternalPerformance to a new lib/internal/perf/performance.js - Move now() getMilestoneTimestamp() into lib/internal/perf/utils.js - Rename lib/internal/perf/perf.js to lib/internal/perf/performance_entry.js - Refresh time origin at startup (this means the time origins could differ between snapshot building time and snapshot creation time) PR-URL: https://github.com/nodejs/node/pull/38971 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: James M Snell <jasnell@gmail.com>
35 lines
823 B
JavaScript
35 lines
823 B
JavaScript
'use strict';
|
|
|
|
const {
|
|
ObjectDefineProperty,
|
|
} = primordials;
|
|
|
|
const {
|
|
constants,
|
|
} = internalBinding('performance');
|
|
|
|
const { PerformanceEntry } = require('internal/perf/performance_entry');
|
|
const { PerformanceObserver } = require('internal/perf/observe');
|
|
const { PerformanceMark } = 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,
|
|
PerformanceObserver,
|
|
monitorEventLoopDelay,
|
|
createHistogram,
|
|
performance: new InternalPerformance(),
|
|
};
|
|
|
|
ObjectDefineProperty(module.exports, 'constants', {
|
|
configurable: false,
|
|
enumerable: true,
|
|
value: constants
|
|
});
|