MCPcopy Create free account
hub / github.com/nodejs/node / createObj

Function createObj

benchmark/diagnostics_channel/publish.js:14–25  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

12function noop() {}
13
14function createObj(size) {
15 return Array.from({ length: size }, (n) => ({
16 foo: 'yarp',
17 nope: {
18 bar: '123',
19 a: [1, 2, 3],
20 baz: n,
21 c: {},
22 b: [],
23 },
24 }));
25}
26
27function main({ n, subscribers, checkSubscribers, objSize }) {
28 const channel = dc.channel('test');

Callers 2

publishWithCheckFunction · 0.70
publishWithoutCheckFunction · 0.70

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected