lib: add trailing commas in internal/perf

PR-URL: https://github.com/nodejs/node/pull/46697
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Antoine du Hamel authored and Michaël Zasso committed 2023-03-13 11:22:53 +01:00
1 parent 4c12e6eeeb
commit 7b5c00aacd
9 files changed
+30 -29

No files matched your search

+1
View File
@@ -287,6 +287,7 @@ overrides:
- ./internal/mime.js
- ./internal/modules/*.js
- ./internal/per_context/messageport.js
- ./internal/perf/*.js
- ./internal/policy/*.js
- ./internal/priority_queue.js
- ./internal/process/*.js
+1 -1
View File
@@ -9,7 +9,7 @@ const {
codes: {
ERR_ILLEGAL_CONSTRUCTOR,
ERR_INVALID_THIS,
}
},
} = require('internal/errors');
const {
+13 -13
View File
@@ -25,7 +25,7 @@ const {
NODE_PERFORMANCE_MILESTONE_LOOP_START,
NODE_PERFORMANCE_MILESTONE_LOOP_EXIT,
NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE,
NODE_PERFORMANCE_MILESTONE_ENVIRONMENT
NODE_PERFORMANCE_MILESTONE_ENVIRONMENT,
},
loopIdleTime,
} = internalBinding('performance');
@@ -37,28 +37,28 @@ class PerformanceNodeTiming {
__proto__: null,
enumerable: true,
configurable: true,
value: 'node'
value: 'node',
},
entryType: {
__proto__: null,
enumerable: true,
configurable: true,
value: 'node'
value: 'node',
},
startTime: {
__proto__: null,
enumerable: true,
configurable: true,
value: 0
value: 0,
},
duration: {
__proto__: null,
enumerable: true,
configurable: true,
get: now
get: now,
},
nodeStart: {
@@ -67,7 +67,7 @@ class PerformanceNodeTiming {
configurable: true,
get() {
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_NODE_START);
}
},
},
v8Start: {
@@ -76,7 +76,7 @@ class PerformanceNodeTiming {
configurable: true,
get() {
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_V8_START);
}
},
},
environment: {
@@ -85,7 +85,7 @@ class PerformanceNodeTiming {
configurable: true,
get() {
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_ENVIRONMENT);
}
},
},
loopStart: {
@@ -94,7 +94,7 @@ class PerformanceNodeTiming {
configurable: true,
get() {
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_START);
}
},
},
loopExit: {
@@ -103,7 +103,7 @@ class PerformanceNodeTiming {
configurable: true,
get() {
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_EXIT);
}
},
},
bootstrapComplete: {
@@ -113,7 +113,7 @@ class PerformanceNodeTiming {
get() {
return getMilestoneTimestamp(
NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE);
}
},
},
idleTime: {
@@ -121,7 +121,7 @@ class PerformanceNodeTiming {
enumerable: true,
configurable: true,
get: loopIdleTime,
}
},
});
}
@@ -130,7 +130,7 @@ class PerformanceNodeTiming {
const opts = {
...options,
depth: options.depth == null ? null : options.depth - 1
depth: options.depth == null ? null : options.depth - 1,
};
return `PerformanceNodeTiming ${inspect(this.toJSON(), opts)}`;
+2 -2
View File
@@ -213,7 +213,7 @@ class PerformanceObserverEntryList {
const opts = {
...options,
depth: options.depth == null ? null : options.depth - 1
depth: options.depth == null ? null : options.depth - 1,
};
return `PerformanceObserverEntryList ${inspect(this[kBuffer], opts)}`;
@@ -358,7 +358,7 @@ class PerformanceObserver {
const opts = {
...options,
depth: options.depth == null ? null : options.depth - 1
depth: options.depth == null ? null : options.depth - 1,
};
return `PerformanceObserver ${inspect({
+5 -5
View File
@@ -10,8 +10,8 @@ const {
const {
codes: {
ERR_ILLEGAL_CONSTRUCTOR,
ERR_MISSING_ARGS
}
ERR_MISSING_ARGS,
},
} = require('internal/errors');
const {
@@ -47,7 +47,7 @@ const { validateInternalField } = require('internal/validators');
const { convertToInt } = require('internal/webidl');
const {
getTimeOriginTimestamp
getTimeOriginTimestamp,
} = internalBinding('performance');
const kPerformanceBrand = Symbol('performance');
@@ -62,7 +62,7 @@ class Performance extends EventTarget {
const opts = {
...options,
depth: options.depth == null ? null : options.depth - 1
depth: options.depth == null ? null : options.depth - 1,
};
return `Performance ${inspect({
@@ -235,7 +235,7 @@ const performance = createPerformance();
function dispatchBufferFull(type) {
const event = new Event(type, {
[kTrustEvent]: true
[kTrustEvent]: true,
});
performance.dispatchEvent(event);
}
+2 -2
View File
@@ -9,7 +9,7 @@ const {
const {
codes: {
ERR_ILLEGAL_CONSTRUCTOR,
}
},
} = require('internal/errors');
const {
@@ -60,7 +60,7 @@ class PerformanceEntry {
const opts = {
...options,
depth: options.depth == null ? null : options.depth - 1
depth: options.depth == null ? null : options.depth - 1,
};
return `${this.constructor.name} ${inspect(this.toJSON(), opts)}`;
+1 -1
View File
@@ -14,7 +14,7 @@ const { enqueue, bufferResourceTiming } = require('internal/perf/observe');
const {
codes: {
ERR_ILLEGAL_CONSTRUCTOR,
}
},
} = require('internal/errors');
const { validateInternalField } = require('internal/validators');
const { kEnumerableProperty } = require('internal/util');
+4 -4
View File
@@ -17,7 +17,7 @@ const {
} = require('internal/validators');
const {
isHistogram
isHistogram,
} = require('internal/histogram');
const {
@@ -57,7 +57,7 @@ function timerify(fn, options = kEmptyObject) {
validateObject(options, 'options');
const {
histogram
histogram,
} = options;
if (histogram !== undefined &&
@@ -99,8 +99,8 @@ function timerify(fn, options = kEmptyObject) {
__proto__: null,
configurable: false,
enumerable: true,
value: `timerified ${fn.name}`
}
value: `timerified ${fn.name}`,
},
});
return timerified;
+1 -1
View File
@@ -29,5 +29,5 @@ function refreshTimeOrigin() {
module.exports = {
now,
getMilestoneTimestamp,
refreshTimeOrigin
refreshTimeOrigin,
};