Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/internal/perf/event_loop_delay.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
} = internalBinding('performance');

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

Expand Down Expand Up @@ -47,7 +47,7 @@ function monitorEventLoopDelay(options = {}) {
validateObject(options, 'options');

const { resolution = 10 } = options;
validateInteger(resolution, 'options.resolution', 1);
validateInt32(resolution, 'options.resolution', 1);

return new ELDHistogram(new _ELDHistogram(resolution));
}
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-performance-eventloopdelay.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const { sleep } = require('internal/util');
);
});

[-1, 0, Infinity].forEach((i) => {
[-1, 0, 2 ** 31, Infinity].forEach((i) => {
assert.throws(
() => monitorEventLoopDelay({ resolution: i }),
{
Expand Down