Bug 1125398 - Benchmark load: arrays of Map (for foreground finalized), r=terrence

--HG--
extra : rebase_source : 8f4ccd90dc0f38bc5bb147997c93213ee8ea7274
This commit is contained in:
Steve Fink 2015-01-21 13:41:43 -08:00
parent bda5705555
commit ebb3d5a14f
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,23 @@
window.tests.set('globalArrayFgFinalized', (function() {
var garbage = [];
var garbageIndex = 0;
return {
description: "var foo = [ new Map, new Map, ... ]; # (foreground finalized)",
load: (N) => { garbage = new Array(N); },
unload: () => { garbage = []; garbageIndex = 0; },
defaultGarbageTotal: "8K",
defaultGarbagePerFrame: "1M",
makeGarbage: (N) => {
var arr = [];
for (var i = 0; i < N; i++) {
arr.push(new Map);
}
garbage[garbageIndex++] = arr;
if (garbageIndex == garbage.length)
garbageIndex = 0;
}
};
})());

View File

@ -13,6 +13,7 @@
<script src="benchmarks/globalArrayObjectLiteral.js"></script>
<script src="benchmarks/globalArrayReallocArray.js"></script>
<script src="benchmarks/globalArrayBuffer.js"></script>
<script src="benchmarks/globalArrayFgFinalized.js"></script>
<script src="benchmarks/selfCyclicWeakMap.js"></script>
<script src="benchmarks/pairCyclicWeakMap.js"></script>
<script src="benchmarks/textNodes.js"></script>