Bug 1125398 - Benchmark load: large ArrayBuffers (for big malloc data), r=terrence

--HG--
extra : rebase_source : 3af9dd952697c475c5fdd3881ffb6126d5daac4b
This commit is contained in:
Steve Fink 2015-01-21 13:20:17 -08:00
Родитель e37454e5b9
Коммит 0240402ceb
2 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,23 @@
window.tests.set('globalArrayBuffer', (function() {
var garbage = [];
var garbageIndex = 0;
return {
description: "var foo = ArrayBuffer(N); # (large malloc data)",
load: (N) => { garbage = new Array(N); },
unload: () => { garbage = []; garbageIndex = 0; },
defaultGarbageTotal: "8K",
defaultGarbagePerFrame: "4M",
makeGarbage: (N) => {
var ab = new ArrayBuffer(N);
var view = new Uint8Array(ab);
view[0] = 1;
view[N - 1] = 2;
garbage[garbageIndex++] = ab;
if (garbageIndex == garbage.length)
garbageIndex = 0;
}
};
})());

Просмотреть файл

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