MCPcopy
hub / github.com/exceljs/exceljs / test

Function test

test/testStringBuf.js:11–24  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

9 const a = [];
10
11 function test(size) {
12 return function() {
13 console.log(`Write: ${size}`);
14 const text = utils.randomName(size);
15 const sb = new StringBuf({size: SIZE + 10});
16 const sw = new HrStopwatch();
17 sw.start();
18 while (sb.length < SIZE) {
19 sb.addText(text);
20 }
21 sw.stop();
22 a.push(`${size}:${Math.round(sw.span * 1000)}`);
23 };
24 }
25
26 return Promise.resolve()
27 .then(test(1))

Callers 2

testWriteFunction · 0.70
testGrowFunction · 0.70

Calls 2

addTextMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…