MCPcopy Index your code
hub / github.com/nodejs/node / main

Function main

benchmark/blob/clone.js:15–25  ·  view source on GitHub ↗
({ n, bytes })

Source from the content-addressed store, hash-verified

13let _cloneResult;
14
15function main({ n, bytes }) {
16 const buff = Buffer.allocUnsafe(bytes);
17 const blob = new Blob(buff);
18 bench.start();
19 for (let i = 0; i < n; ++i)
20 _cloneResult = structuredClone(blob);
21 bench.end(n);
22
23 // Avoid V8 deadcode (elimination)
24 assert.ok(_cloneResult);
25}

Callers

nothing calls this directly

Calls 4

structuredCloneFunction · 0.85
startMethod · 0.45
endMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected