MCPcopy
hub / github.com/mongodb/node-mongodb-native / testArrayShift

Function testArrayShift

test/benchmarks/unitBench/list.bench.js:30–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28};
29
30const testArrayShift = () => {
31 let bigArray = makeBigArray();
32 const h = createHistogram();
33 for (let runs = 0; runs < iterations; runs++) {
34 h.recordDelta();
35 while (bigArray.length) bigArray.shift();
36 h.recordDelta();
37 bigArray = makeBigArray();
38 }
39
40 printHistogram(`shift(${defaultItemsSize}) from Array`, h);
41};
42
43const testListShift = () => {
44 const bigList = new List();

Callers 1

mainFunction · 0.85

Calls 3

makeBigArrayFunction · 0.85
printHistogramFunction · 0.85
shiftMethod · 0.45

Tested by

no test coverage detected