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

Function main

benchmark/blob/slice.js:16–27  ·  view source on GitHub ↗
({ n, dataSize })

Source from the content-addressed store, hash-verified

14let _sliceResult;
15
16function main({ n, dataSize }) {
17 const data = 'a'.repeat(dataSize);
18 const reusableBlob = new Blob([data]);
19
20 bench.start();
21 for (let i = 0; i < n; ++i)
22 _sliceResult = reusableBlob.slice(0, Math.floor(data.length / 2));
23 bench.end(n);
24
25 // Avoid V8 deadcode (elimination)
26 assert.ok(_sliceResult);
27}

Callers

nothing calls this directly

Calls 4

sliceMethod · 0.95
startMethod · 0.45
endMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…