GeezerVison is showing github.com — lib: add trailing commas in `internal/perf` · nodejs/node@4cf3de8
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: lib/.eslintrc.yaml +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -275,6 +275,7 @@ overrides: | 275 | 275 | - ./internal/mime.js | 276 | 276 | - ./internal/modules/*.js | 277 | 277 | - ./internal/per_context/messageport.js | | 278 | + - ./internal/perf/*.js | 278 | 279 | - ./internal/policy/*.js | 279 | 280 | - ./internal/priority_queue.js | 280 | 281 | - ./internal/process/*.js | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/perf/event_loop_delay.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | codes: { | 10 | 10 | ERR_ILLEGAL_CONSTRUCTOR, | 11 | 11 | ERR_INVALID_THIS, | 12 | | - } | | 12 | + }, | 13 | 13 | } = require('internal/errors'); | 14 | 14 |
| 15 | 15 | const { | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/perf/nodetiming.js +13-13Lines changed: 13 additions & 13 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -25,7 +25,7 @@ const { | 25 | 25 | NODE_PERFORMANCE_MILESTONE_LOOP_START, | 26 | 26 | NODE_PERFORMANCE_MILESTONE_LOOP_EXIT, | 27 | 27 | NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE, | 28 | | - NODE_PERFORMANCE_MILESTONE_ENVIRONMENT | | 28 | + NODE_PERFORMANCE_MILESTONE_ENVIRONMENT, | 29 | 29 | }, | 30 | 30 | loopIdleTime, | 31 | 31 | } = internalBinding('performance'); | @@ -37,28 +37,28 @@ class PerformanceNodeTiming { | 37 | 37 | __proto__: null, | 38 | 38 | enumerable: true, | 39 | 39 | configurable: true, | 40 | | - value: 'node' | | 40 | + value: 'node', | 41 | 41 | }, | 42 | 42 |
| 43 | 43 | entryType: { | 44 | 44 | __proto__: null, | 45 | 45 | enumerable: true, | 46 | 46 | configurable: true, | 47 | | - value: 'node' | | 47 | + value: 'node', | 48 | 48 | }, | 49 | 49 |
| 50 | 50 | startTime: { | 51 | 51 | __proto__: null, | 52 | 52 | enumerable: true, | 53 | 53 | configurable: true, | 54 | | - value: 0 | | 54 | + value: 0, | 55 | 55 | }, | 56 | 56 |
| 57 | 57 | duration: { | 58 | 58 | __proto__: null, | 59 | 59 | enumerable: true, | 60 | 60 | configurable: true, | 61 | | - get: now | | 61 | + get: now, | 62 | 62 | }, | 63 | 63 |
| 64 | 64 | nodeStart: { | @@ -67,7 +67,7 @@ class PerformanceNodeTiming { | 67 | 67 | configurable: true, | 68 | 68 | get() { | 69 | 69 | return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_NODE_START); | 70 | | - } | | 70 | + }, | 71 | 71 | }, | 72 | 72 |
| 73 | 73 | v8Start: { | @@ -76,7 +76,7 @@ class PerformanceNodeTiming { | 76 | 76 | configurable: true, | 77 | 77 | get() { | 78 | 78 | return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_V8_START); | 79 | | - } | | 79 | + }, | 80 | 80 | }, | 81 | 81 |
| 82 | 82 | environment: { | @@ -85,7 +85,7 @@ class PerformanceNodeTiming { | 85 | 85 | configurable: true, | 86 | 86 | get() { | 87 | 87 | return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_ENVIRONMENT); | 88 | | - } | | 88 | + }, | 89 | 89 | }, | 90 | 90 |
| 91 | 91 | loopStart: { | @@ -94,7 +94,7 @@ class PerformanceNodeTiming { | 94 | 94 | configurable: true, | 95 | 95 | get() { | 96 | 96 | return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_START); | 97 | | - } | | 97 | + }, | 98 | 98 | }, | 99 | 99 |
| 100 | 100 | loopExit: { | @@ -103,7 +103,7 @@ class PerformanceNodeTiming { | 103 | 103 | configurable: true, | 104 | 104 | get() { | 105 | 105 | return getMilestoneTimestamp(NODE_PERFORMANCE_MILESTONE_LOOP_EXIT); | 106 | | - } | | 106 | + }, | 107 | 107 | }, | 108 | 108 |
| 109 | 109 | bootstrapComplete: { | @@ -113,15 +113,15 @@ class PerformanceNodeTiming { | 113 | 113 | get() { | 114 | 114 | return getMilestoneTimestamp( | 115 | 115 | NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE); | 116 | | - } | | 116 | + }, | 117 | 117 | }, | 118 | 118 |
| 119 | 119 | idleTime: { | 120 | 120 | __proto__: null, | 121 | 121 | enumerable: true, | 122 | 122 | configurable: true, | 123 | 123 | get: loopIdleTime, | 124 | | - } | | 124 | + }, | 125 | 125 | }); | 126 | 126 | } | 127 | 127 |
| @@ -130,7 +130,7 @@ class PerformanceNodeTiming { | 130 | 130 |
| 131 | 131 | const opts = { | 132 | 132 | ...options, | 133 | | - depth: options.depth == null ? null : options.depth - 1 | | 133 | + depth: options.depth == null ? null : options.depth - 1, | 134 | 134 | }; | 135 | 135 |
| 136 | 136 | return `PerformanceNodeTiming ${inspect(this.toJSON(), opts)}`; | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/perf/observe.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -202,7 +202,7 @@ class PerformanceObserverEntryList { | 202 | 202 |
| 203 | 203 | const opts = { | 204 | 204 | ...options, | 205 | | - depth: options.depth == null ? null : options.depth - 1 | | 205 | + depth: options.depth == null ? null : options.depth - 1, | 206 | 206 | }; | 207 | 207 |
| 208 | 208 | return `PerformanceObserverEntryList ${inspect(this.#buffer, opts)}`; | @@ -327,7 +327,7 @@ class PerformanceObserver { | 327 | 327 |
| 328 | 328 | const opts = { | 329 | 329 | ...options, | 330 | | - depth: options.depth == null ? null : options.depth - 1 | | 330 | + depth: options.depth == null ? null : options.depth - 1, | 331 | 331 | }; | 332 | 332 |
| 333 | 333 | return `PerformanceObserver ${inspect({ | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/perf/performance.js +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | const { | 10 | 10 | codes: { | 11 | 11 | ERR_ILLEGAL_CONSTRUCTOR, | 12 | | - ERR_MISSING_ARGS | 13 | | - } | | 12 | + ERR_MISSING_ARGS, | | 13 | + }, | 14 | 14 | } = require('internal/errors'); | 15 | 15 |
| 16 | 16 | const { | @@ -42,7 +42,7 @@ const { customInspectSymbol: kInspect } = require('internal/util'); | 42 | 42 | const { inspect } = require('util'); | 43 | 43 |
| 44 | 44 | const { | 45 | | - getTimeOriginTimestamp | | 45 | + getTimeOriginTimestamp, | 46 | 46 | } = internalBinding('performance'); | 47 | 47 |
| 48 | 48 | class Performance extends EventTarget { | @@ -55,7 +55,7 @@ class Performance extends EventTarget { | 55 | 55 |
| 56 | 56 | const opts = { | 57 | 57 | ...options, | 58 | | - depth: options.depth == null ? null : options.depth - 1 | | 58 | + depth: options.depth == null ? null : options.depth - 1, | 59 | 59 | }; | 60 | 60 |
| 61 | 61 | return `Performance ${inspect({ | @@ -237,7 +237,7 @@ const performance = new InternalPerformance(); | 237 | 237 |
| 238 | 238 | function dispatchBufferFull(type) { | 239 | 239 | const event = new Event(type, { | 240 | | - [kTrustEvent]: true | | 240 | + [kTrustEvent]: true, | 241 | 241 | }); | 242 | 242 | performance.dispatchEvent(event); | 243 | 243 | } | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/perf/performance_entry.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 8 | 8 | const { | 9 | 9 | codes: { | 10 | 10 | ERR_ILLEGAL_CONSTRUCTOR, | 11 | | - } | | 11 | + }, | 12 | 12 | } = require('internal/errors'); | 13 | 13 |
| 14 | 14 | const { | @@ -47,7 +47,7 @@ class PerformanceEntry { | 47 | 47 |
| 48 | 48 | const opts = { | 49 | 49 | ...options, | 50 | | - depth: options.depth == null ? null : options.depth - 1 | | 50 | + depth: options.depth == null ? null : options.depth - 1, | 51 | 51 | }; | 52 | 52 |
| 53 | 53 | return `${this.constructor.name} ${inspect(this.toJSON(), opts)}`; | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/perf/resource_timing.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ const kInitiatorType = Symbol('kInitiatorType'); | 15 | 15 | const { | 16 | 16 | codes: { | 17 | 17 | ERR_ILLEGAL_CONSTRUCTOR, | 18 | | - } | | 18 | + }, | 19 | 19 | } = require('internal/errors'); | 20 | 20 |
| 21 | 21 | class InternalPerformanceResourceTiming extends InternalPerformanceEntry { | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/perf/timerify.js +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -17,7 +17,7 @@ const { | 17 | 17 | } = require('internal/validators'); | 18 | 18 |
| 19 | 19 | const { | 20 | | - isHistogram | | 20 | + isHistogram, | 21 | 21 | } = require('internal/histogram'); | 22 | 22 |
| 23 | 23 | const { | @@ -57,7 +57,7 @@ function timerify(fn, options = kEmptyObject) { | 57 | 57 |
| 58 | 58 | validateObject(options, 'options'); | 59 | 59 | const { | 60 | | - histogram | | 60 | + histogram, | 61 | 61 | } = options; | 62 | 62 |
| 63 | 63 | if (histogram !== undefined && | @@ -99,8 +99,8 @@ function timerify(fn, options = kEmptyObject) { | 99 | 99 | __proto__: null, | 100 | 100 | configurable: false, | 101 | 101 | enumerable: true, | 102 | | - value: `timerified ${fn.name}` | 103 | | - } | | 102 | + value: `timerified ${fn.name}`, | | 103 | + }, | 104 | 104 | }); | 105 | 105 |
| 106 | 106 | return timerified; | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/perf/utils.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,5 +29,5 @@ function refreshTimeOrigin() { | 29 | 29 | module.exports = { | 30 | 30 | now, | 31 | 31 | getMilestoneTimestamp, | 32 | | - refreshTimeOrigin | | 32 | + refreshTimeOrigin, | 33 | 33 | }; |
|