Skip to content

Commit 7fc3143

Browse files
artimmyaduh95
authored andcommitted
benchmark: reduce N for diagnostics_channel subscribe benchmark
Signed-off-by: artimmy <arthurtimmy@hotmail.com> PR-URL: #59116 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 82d4175 commit 7fc3143

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

benchmark/diagnostics_channel/subscribe.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ const common = require('../common.js');
33
const dc = require('diagnostics_channel');
44

55
const bench = common.createBenchmark(main, {
6-
n: [1e8],
6+
n: [1e5],
77
});
88

9-
function noop() {}
9+
function noop() { }
1010

1111
function main({ n }) {
12-
const channel = dc.channel('channel.0');
1312

1413
bench.start();
1514
for (let i = 0; i < n; i++) {
16-
channel.subscribe(noop);
15+
dc.subscribe('channel.0', noop);
1716
}
1817
bench.end(n);
1918
}

0 commit comments

Comments
 (0)