From 3b5a5f243a7969ad9abb8c0e1d7d21204504a040 Mon Sep 17 00:00:00 2001 From: Arthur Angelo <31295727+artimmy@users.noreply.github.com> Date: Sun, 20 Jul 2025 17:45:00 -0300 Subject: [PATCH] benchmark: reduce N for diagnostics_channel subscribe benchmark Signed-off-by: artimmy PR-URL: https://github.com/nodejs/node/pull/59116 Reviewed-By: Rafael Gonzaga Reviewed-By: Stephen Belanger Reviewed-By: Luigi Pinca --- benchmark/diagnostics_channel/subscribe.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/benchmark/diagnostics_channel/subscribe.js b/benchmark/diagnostics_channel/subscribe.js index 1415054588..c7cffac5ed 100644 --- a/benchmark/diagnostics_channel/subscribe.js +++ b/benchmark/diagnostics_channel/subscribe.js @@ -3,17 +3,16 @@ const common = require('../common.js'); const dc = require('diagnostics_channel'); const bench = common.createBenchmark(main, { - n: [1e8], + n: [1e5], }); -function noop() {} +function noop() { } function main({ n }) { - const channel = dc.channel('channel.0'); bench.start(); for (let i = 0; i < n; i++) { - channel.subscribe(noop); + dc.subscribe('channel.0', noop); } bench.end(n); }