From c713f079f1bd1c575487c693f3f9244bed460ee1 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Tue, 23 Jan 2018 13:19:14 +0100 Subject: [PATCH] benchmark: (timers) refactor PR-URL: https://github.com/nodejs/node/pull/18320 Reviewed-By: James M Snell --- benchmark/timers/set-immediate-breadth.js | 2 +- benchmark/timers/set-immediate-depth-args.js | 2 +- benchmark/timers/timers-cancel-pooled.js | 2 +- benchmark/timers/timers-cancel-unpooled.js | 2 +- benchmark/timers/timers-insert-unpooled.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/benchmark/timers/set-immediate-breadth.js b/benchmark/timers/set-immediate-breadth.js index a4b217b5bff8d6..4f7d2cd2761334 100644 --- a/benchmark/timers/set-immediate-breadth.js +++ b/benchmark/timers/set-immediate-breadth.js @@ -9,7 +9,7 @@ function main({ millions }) { const N = millions * 1e6; process.on('exit', function() { - bench.end(N / 1e6); + bench.end(millions); }); function cb() {} diff --git a/benchmark/timers/set-immediate-depth-args.js b/benchmark/timers/set-immediate-depth-args.js index fe1340c4bd55f2..aa5ec95f7dad30 100644 --- a/benchmark/timers/set-immediate-depth-args.js +++ b/benchmark/timers/set-immediate-depth-args.js @@ -9,7 +9,7 @@ function main({ millions }) { const N = millions * 1e6; process.on('exit', function() { - bench.end(N / 1e6); + bench.end(millions); }); function cb3(n, arg2, arg3) { diff --git a/benchmark/timers/timers-cancel-pooled.js b/benchmark/timers/timers-cancel-pooled.js index 33897507c83937..3e262f820a3e08 100644 --- a/benchmark/timers/timers-cancel-pooled.js +++ b/benchmark/timers/timers-cancel-pooled.js @@ -28,5 +28,5 @@ function main({ millions }) { } function cb() { - assert(false, 'Timer should not call callback'); + assert.fail('Timer should not call callback'); } diff --git a/benchmark/timers/timers-cancel-unpooled.js b/benchmark/timers/timers-cancel-unpooled.js index 57e0139dfe1a4a..158667311330a4 100644 --- a/benchmark/timers/timers-cancel-unpooled.js +++ b/benchmark/timers/timers-cancel-unpooled.js @@ -22,5 +22,5 @@ function main({ millions }) { } function cb() { - assert(false, `Timer ${this._idleTimeout} should not call callback`); + assert.fail(`Timer ${this._idleTimeout} should not call callback`); } diff --git a/benchmark/timers/timers-insert-unpooled.js b/benchmark/timers/timers-insert-unpooled.js index 56526633358e42..fbbeebb759ff3a 100644 --- a/benchmark/timers/timers-insert-unpooled.js +++ b/benchmark/timers/timers-insert-unpooled.js @@ -23,5 +23,5 @@ function main({ millions }) { } function cb() { - assert(false, `Timer ${this._idleTimeout} should not call callback`); + assert.fail(`Timer ${this._idleTimeout} should not call callback`); }