diff --git a/src/node_perf.cc b/src/node_perf.cc index 2d6341e01136fe..c1a0b2cf3a14d7 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -237,7 +237,7 @@ void LoopIdleTime(const FunctionCallbackInfo& args) { void ELDHistogram::New(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); CHECK(args.IsConstructCall()); - int32_t resolution = args[0].As()->Value(); + int64_t resolution = args[0].As()->Value(); CHECK_GT(resolution, 0); new ELDHistogram(env, args.This(), resolution); } @@ -253,7 +253,7 @@ void ELDHistogram::Initialize(Environment* env, Local target) { ELDHistogram::ELDHistogram( Environment* env, Local wrap, - int32_t interval) + int64_t interval) : IntervalHistogram( env, wrap, diff --git a/src/node_perf.h b/src/node_perf.h index d0f1d68462265c..33cf9f2ec651bf 100644 --- a/src/node_perf.h +++ b/src/node_perf.h @@ -166,7 +166,7 @@ class ELDHistogram : public IntervalHistogram { ELDHistogram( Environment* env, v8::Local wrap, - int32_t interval); + int64_t interval); void OnInterval() override; diff --git a/test/sequential/test-performance-eventloopdelay.js b/test/sequential/test-performance-eventloopdelay.js index b12d3a72341ee9..f262e9de3fe6cb 100644 --- a/test/sequential/test-performance-eventloopdelay.js +++ b/test/sequential/test-performance-eventloopdelay.js @@ -39,7 +39,7 @@ const { sleep } = require('internal/util'); ); }); - [-1, 0, Infinity].forEach((i) => { + [-1, 0, 2 ** 53, Infinity].forEach((i) => { assert.throws( () => monitorEventLoopDelay({ resolution: i }), {