Skip to content

Commit 7fc3143

Browse files
artimmyaduh95
authored andcommitted
benchmark: reduce N for diagnostics_channel subscribe benchmark
Signed-off-by: artimmy <[email protected]> PR-URL: #59116 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
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
constdc=require('diagnostics_channel');
44

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

9-
functionnoop(){}
9+
functionnoop(){}
1010

1111
functionmain({ n }){
12-
constchannel=dc.channel('channel.0');
1312

1413
bench.start();
1514
for(leti=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)