We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e8dea3 commit 551aa74Copy full SHA for 551aa74
lib/perf_hooks.js
@@ -59,6 +59,14 @@ class Performance extends EventTarget {
59
timeOrigin: this.timeOrigin,
60
}, opts)}`;
61
}
62
+
63
+ toJSON() {
64
+ return {
65
+ nodeTiming: this.nodeTiming.toJSON(),
66
+ timeOrigin: this.timeOrigin,
67
+ eventLoopUtilization: this.eventLoopUtilization()
68
+ };
69
+ }
70
71
72
class InternalPerformance extends EventTarget {}
@@ -114,7 +122,7 @@ module.exports = {
114
122
PerformanceObserver,
115
123
monitorEventLoopDelay,
116
124
createHistogram,
117
- performance: new InternalPerformance(),
125
+ performance: new InternalPerformance()
118
126
};
119
127
120
128
ObjectDefineProperty(module.exports, 'constants', {
0 commit comments