We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69ff2d0 commit 6651299Copy full SHA for 6651299
lib/internal/perf/event_loop_delay.js
@@ -9,6 +9,7 @@ const {
9
} = internalBinding('performance');
10
11
const {
12
+ validateInteger,
13
validateNumber,
14
validateObject,
15
} = require('internal/validators');
@@ -34,9 +35,7 @@ function monitorEventLoopDelay(options = {}) {
34
35
validateObject(options, 'options');
36
37
const { resolution = 10 } = options;
- validateNumber(resolution, 'options.resolution');
38
- if (resolution <= 0 || !NumberIsSafeInteger(resolution))
39
- throw new ERR_INVALID_ARG_VALUE.RangeError('resolution', resolution);
+ validateInteger(resolution, 'options.resolution', 1);
40
41
return new ELDHistogram(new _ELDHistogram(resolution));
42
}
0 commit comments