Skip to content

Commit 4cf3de8

Browse files
aduh95danielleadams
authored andcommitted
lib: add trailing commas in internal/perf
PR-URL: #46697 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent efc2409 commit 4cf3de8

9 files changed

+30
-29
lines changed

lib/.eslintrc.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ overrides:
275275
- ./internal/mime.js
276276
- ./internal/modules/*.js
277277
- ./internal/per_context/messageport.js
278+
- ./internal/perf/*.js
278279
- ./internal/policy/*.js
279280
- ./internal/priority_queue.js
280281
- ./internal/process/*.js

lib/internal/perf/event_loop_delay.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {
99
codes: {
1010
ERR_ILLEGAL_CONSTRUCTOR,
1111
ERR_INVALID_THIS,
12-
}
12+
},
1313
} = require('internal/errors');
1414

1515
const {

lib/internal/perf/nodetiming.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const {
2525
NODE_PERFORMANCE_MILESTONE_LOOP_START,
2626
NODE_PERFORMANCE_MILESTONE_LOOP_EXIT,
2727
NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE,
28-
NODE_PERFORMANCE_MILESTONE_ENVIRONMENT
28+
NODE_PERFORMANCE_MILESTONE_ENVIRONMENT,
2929
},
3030
loopIdleTime,
3131
} = internalBinding('performance');
@@ -37,28 +37,28 @@ class PerformanceNodeTiming {
3737
__proto__: null,
3838
enumerable: true,
3939
configurable: true,
40-
value: 'node'
40+
value: 'node',
4141
},
4242

4343
entryType: {
4444
__proto__: null,
4545
enumerable: true,
4646
configurable: true,
47-
value: 'node'
47+
value: 'node',
4848
},
4949

5050
startTime: {
5151
__proto__: null,
5252
enumerable: true,
5353
configurable: true,
54-
value: 0
54+
value: 0,
5555
},
5656

5757
duration: {
5858
__proto__: null,
5959
enumerable: true,
6060
configurable: true,
61-
get: now
61+
get: now,
6262
},
6363

6464
nodeStart: {
@@ -67,7 +67,7 @@ class PerformanceNodeTiming {
6767
configurable: true,
6868
get() {
6969
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_NODE_START);
70-
}
70+
},
7171
},
7272

7373
v8Start: {
@@ -76,7 +76,7 @@ class PerformanceNodeTiming {
7676
configurable: true,
7777
get() {
7878
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_V8_START);
79-
}
79+
},
8080
},
8181

8282
environment: {
@@ -85,7 +85,7 @@ class PerformanceNodeTiming {
8585
configurable: true,
8686
get() {
8787
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_ENVIRONMENT);
88-
}
88+
},
8989
},
9090

9191
loopStart: {
@@ -94,7 +94,7 @@ class PerformanceNodeTiming {
9494
configurable: true,
9595
get() {
9696
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_START);
97-
}
97+
},
9898
},
9999

100100
loopExit: {
@@ -103,7 +103,7 @@ class PerformanceNodeTiming {
103103
configurable: true,
104104
get() {
105105
return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_EXIT);
106-
}
106+
},
107107
},
108108

109109
bootstrapComplete: {
@@ -113,15 +113,15 @@ class PerformanceNodeTiming {
113113
get() {
114114
return getMilestoneTimestamp(
115115
NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE);
116-
}
116+
},
117117
},
118118

119119
idleTime: {
120120
__proto__: null,
121121
enumerable: true,
122122
configurable: true,
123123
get: loopIdleTime,
124-
}
124+
},
125125
});
126126
}
127127

@@ -130,7 +130,7 @@ class PerformanceNodeTiming {
130130

131131
const opts = {
132132
...options,
133-
depth: options.depth == null ? null : options.depth - 1
133+
depth: options.depth == null ? null : options.depth - 1,
134134
};
135135

136136
return `PerformanceNodeTiming ${inspect(this.toJSON(), opts)}`;

lib/internal/perf/observe.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class PerformanceObserverEntryList {
202202

203203
const opts = {
204204
...options,
205-
depth: options.depth == null ? null : options.depth - 1
205+
depth: options.depth == null ? null : options.depth - 1,
206206
};
207207

208208
return `PerformanceObserverEntryList ${inspect(this.#buffer, opts)}`;
@@ -327,7 +327,7 @@ class PerformanceObserver {
327327

328328
const opts = {
329329
...options,
330-
depth: options.depth == null ? null : options.depth - 1
330+
depth: options.depth == null ? null : options.depth - 1,
331331
};
332332

333333
return `PerformanceObserver ${inspect({

lib/internal/perf/performance.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const {
99
const {
1010
codes: {
1111
ERR_ILLEGAL_CONSTRUCTOR,
12-
ERR_MISSING_ARGS
13-
}
12+
ERR_MISSING_ARGS,
13+
},
1414
} = require('internal/errors');
1515

1616
const {
@@ -42,7 +42,7 @@ const { customInspectSymbol: kInspect } = require('internal/util');
4242
const { inspect } = require('util');
4343

4444
const {
45-
getTimeOriginTimestamp
45+
getTimeOriginTimestamp,
4646
} = internalBinding('performance');
4747

4848
class Performance extends EventTarget {
@@ -55,7 +55,7 @@ class Performance extends EventTarget {
5555

5656
const opts = {
5757
...options,
58-
depth: options.depth == null ? null : options.depth - 1
58+
depth: options.depth == null ? null : options.depth - 1,
5959
};
6060

6161
return `Performance ${inspect({
@@ -237,7 +237,7 @@ const performance = new InternalPerformance();
237237

238238
function dispatchBufferFull(type) {
239239
const event = new Event(type, {
240-
[kTrustEvent]: true
240+
[kTrustEvent]: true,
241241
});
242242
performance.dispatchEvent(event);
243243
}

lib/internal/perf/performance_entry.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const {
88
const {
99
codes: {
1010
ERR_ILLEGAL_CONSTRUCTOR,
11-
}
11+
},
1212
} = require('internal/errors');
1313

1414
const {
@@ -47,7 +47,7 @@ class PerformanceEntry {
4747

4848
const opts = {
4949
...options,
50-
depth: options.depth == null ? null : options.depth - 1
50+
depth: options.depth == null ? null : options.depth - 1,
5151
};
5252

5353
return `${this.constructor.name} ${inspect(this.toJSON(), opts)}`;

lib/internal/perf/resource_timing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const kInitiatorType = Symbol('kInitiatorType');
1515
const {
1616
codes: {
1717
ERR_ILLEGAL_CONSTRUCTOR,
18-
}
18+
},
1919
} = require('internal/errors');
2020

2121
class InternalPerformanceResourceTiming extends InternalPerformanceEntry {

lib/internal/perf/timerify.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const {
1717
} = require('internal/validators');
1818

1919
const {
20-
isHistogram
20+
isHistogram,
2121
} = require('internal/histogram');
2222

2323
const {
@@ -57,7 +57,7 @@ function timerify(fn, options = kEmptyObject) {
5757

5858
validateObject(options, 'options');
5959
const {
60-
histogram
60+
histogram,
6161
} = options;
6262

6363
if (histogram !== undefined &&
@@ -99,8 +99,8 @@ function timerify(fn, options = kEmptyObject) {
9999
__proto__: null,
100100
configurable: false,
101101
enumerable: true,
102-
value: `timerified ${fn.name}`
103-
}
102+
value: `timerified ${fn.name}`,
103+
},
104104
});
105105

106106
return timerified;

lib/internal/perf/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ function refreshTimeOrigin() {
2929
module.exports = {
3030
now,
3131
getMilestoneTimestamp,
32-
refreshTimeOrigin
32+
refreshTimeOrigin,
3333
};

0 commit comments

Comments
 (0)