Skip to content
Merged
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
11 changes: 7 additions & 4 deletions JetStreamDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,12 @@ class Driver {
} else if (!dumpJSONResults)
console.log("Starting JetStream3");

await updateUI();

performance.mark("update-ui-start");
const start = performance.now();
for (const benchmark of this.benchmarks) {
benchmark.updateUIBeforeRun();

await benchmark.updateUIBeforeRun();
await updateUI();
performance.measure("runner update-ui", "update-ui-start");

try {
await benchmark.run();
Expand All @@ -246,6 +245,7 @@ class Driver {
throw e;
}

performance.mark("update-ui");
benchmark.updateUIAfterRun();

if (isInBrowser) {
Expand All @@ -258,6 +258,7 @@ class Driver {
}
}
}
performance.measure("runner update-ui", "update-ui-start");

const totalTime = performance.now() - start;
if (measureTotalTimeAsSubtest) {
Expand Down Expand Up @@ -774,6 +775,7 @@ class Benchmark {
}
addScript(this.runnerCode);

performance.mark(this.name);
this.startTime = performance.now();

if (RAMification)
Expand All @@ -794,6 +796,7 @@ class Benchmark {
const results = await promise;

this.endTime = performance.now();
performance.measure(this.name, this.name);

if (RAMification) {
const memoryFootprint = MemoryFootprint();
Expand Down
6 changes: 6 additions & 0 deletions shell-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ if (isSpiderMonkey) {
globalThis.readFile = readRelativeToScript;
globalThis.arguments = scriptArgs;
}

if (typeof performance == "undefined")
performance = {};

performance.mark ??= function(){};
performance.measure ??= function(){};
Loading