benchmark: reduce N for diagnostics_channel subscribe benchmark

Signed-off-by: artimmy <arthurtimmy@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/59116
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Arthur Angelo 2025-07-20 17:45:00 -03:00 committed by GitHub
parent 29626f8fb8
commit 3b5a5f243a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}