Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions packages/component/bench/tachometer/bench-krausest.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,36 @@ for (let i = 0; i < 50; i++) {
performance.measure('update-gc-50', startMark('update-gc-50'));
destroy();

/*******************************
Update (aggressive GC)
update-10th workload after krausest's aggressive last-resort major GC.
Pairs against update-gc-50 (plain gc): if this clears the regression
and plain gc does not, create-10k's old-space sizing is reclaimable by
a between-op GC hook. If a residual survives, only a fresh realm
(separate page per op) resets it.
*******************************/

const el5c = await mount();
el5c.component.run(1000);
await flush();
if (globalThis.gc) {
try {
globalThis.gc({ type: 'major', execution: 'sync', flavor: 'last-resort' });
}
catch {
globalThis.gc();
}
await flush();
}
// purpose: update-10th workload after an aggressive last-resort major GC (krausest's incantation). Pairs with update-gc-50 to test whether aggressive GC reclaims create-10k old-space sizing that a plain gc leaves.
performance.mark(startMark('update-gc-aggressive-50'));
for (let i = 0; i < 50; i++) {
el5c.component.update();
flushWork();
}
performance.measure('update-gc-aggressive-50', startMark('update-gc-aggressive-50'));
destroy();

/*******************************
Select
(krausest 05_select)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{ "mode": "performance", "entryName": "update-10th-50" },
{ "mode": "performance", "entryName": "update-isolated-50" },
{ "mode": "performance", "entryName": "update-gc-50" },
{ "mode": "performance", "entryName": "update-gc-aggressive-50" },
{ "mode": "performance", "entryName": "select-40" },
{ "mode": "performance", "entryName": "swap-rows-20" },
{ "mode": "performance", "entryName": "remove-row-front-20" },
Expand All @@ -37,6 +38,7 @@
{ "mode": "performance", "entryName": "update-10th-50" },
{ "mode": "performance", "entryName": "update-isolated-50" },
{ "mode": "performance", "entryName": "update-gc-50" },
{ "mode": "performance", "entryName": "update-gc-aggressive-50" },
{ "mode": "performance", "entryName": "select-40" },
{ "mode": "performance", "entryName": "swap-rows-20" },
{ "mode": "performance", "entryName": "remove-row-front-20" },
Expand Down
Loading