Skip to content

Commit

Permalink
fixup! [Squash] nits
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Jan 30, 2021
1 parent 1d7fc41 commit 4f366e2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 5 additions & 1 deletion lib/internal/perf/event_loop_delay.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ const {
ELDHistogram: _ELDHistogram,
} = internalBinding('performance');

const {
validateNumber,
validateObject,
} = require('internal/validators');

const {
codes: {
ERR_INVALID_ARG_TYPE,
ERR_INVALID_ARG_VALUE,
},
} = require('internal/errors');
Expand Down
1 change: 1 addition & 0 deletions lib/internal/perf/nodetiming.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const {
ObjectDefineProperties,
ObjectSetPrototypeOf,
SafeArrayIterator,
SafeSet,
} = primordials;

Expand Down
6 changes: 4 additions & 2 deletions lib/internal/perf/observe.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'use strict';

const {
Array,
ArrayFrom,
ArrayIsArray,
ArrayPrototypeFilter,
ArrayPrototypeIncludes,
ArrayPrototypePush,
ArrayPrototypeSlice,
ArrayPrototypeSort,
ObjectDefineProperties,
ObjectFreeze,
Expand Down Expand Up @@ -89,7 +91,7 @@ function queuePending() {
isPending = true;
setImmediate(() => {
isPending = false;
for(const pending of kPending)
for (const pending of kPending)
pending[kDispatch]();
kPending.clear();
});
Expand Down
5 changes: 2 additions & 3 deletions lib/internal/perf/usertiming.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const {
ObjectEntries,
ObjectKeys,
SafeMap,
} = primordials;

Expand Down Expand Up @@ -114,8 +114,7 @@ function calculateStartDuration(startOrMeasureOptions, endMark) {
}

end = getMark(endMark || end) ??
(start !== undefined && duration !== undefined) ?
start + duration : now();
(start !== undefined && duration !== undefined) ? start + duration : now();

start ??= (duration !== undefined) ? end - duration : 0;

Expand Down

0 comments on commit 4f366e2

Please sign in to comment.