Skip to content
Open
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
5 changes: 3 additions & 2 deletions JetStreamDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1609,6 +1609,7 @@ class AsyncBenchmark extends DefaultBenchmark {

performance.measure(iterationMarkLabel, iterationMarkLabel);

benchmark.postIteration?.(i);
${this.postIterationCode}

results.push(Math.max(1, end - start));
Expand Down Expand Up @@ -2693,7 +2694,7 @@ let BENCHMARKS = [
BUNDLE: "./workloads/babylonjs/dist/bundle.es5.min.js",
},
args: {
expectedCacheCommentCount: 23988,
expectedCacheCommentCount: 23992,
},
tags: ["startup", "js", "class", "es5", "babylonjs"],
iterations: 10,
Expand All @@ -2708,7 +2709,7 @@ let BENCHMARKS = [
BUNDLE: "./workloads/babylonjs/dist/bundle.es6.min.js",
},
args: {
expectedCacheCommentCount: 21222,
expectedCacheCommentCount: 21225,
},
tags: ["Default", "js", "startup", "class", "es6", "babylonjs"],
iterations: 10,
Expand Down
10 changes: 9 additions & 1 deletion workloads/babylonjs/benchmark/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Benchmark {
cannonData: null,
particlesJson: null,
};
sceneDisposer;

constructor(iterationCount) {
this.iterationCount = iterationCount;
Expand All @@ -54,12 +55,13 @@ class Benchmark {
}

async runIteration() {
const {classNames, cameraRotationLength} = await BabylonJSBenchmark.runComplexScene(
const {classNames, cameraRotationLength, disposer} = await BabylonJSBenchmark.runComplexScene(
this.preloaded.fortData,
this.preloaded.cannonData,
this.preloaded.particlesJson,
100
);
this.sceneDisposer = disposer;
const lastResult = {
classNames,
cameraRotationLength
Expand All @@ -76,4 +78,10 @@ class Benchmark {
if (value != expected)
throw new Error(`Expected ${name} to be ${expected}, but got ${value}`);
}

postIteration() {
// FIXME: move to measured phase.
this.sceneDisposer();
}
Comment on lines +82 to +85

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're not doing this in JS3 should we move this to runIteration?

}

9 changes: 8 additions & 1 deletion workloads/babylonjs/benchmark/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

class Benchmark extends StartupBenchmark {
iteration = 0;
sceneDisposer;

constructor({iterationCount, expectedCacheCommentCount}) {
super({
Expand All @@ -47,7 +48,8 @@ class Benchmark extends StartupBenchmark {
eval(sourceCode);
// const runStart = performance.now();

const { classNames, cameraRotationLength } = BabylonJSBenchmark.runTest(30);
const { classNames, cameraRotationLength, disposer} = BabylonJSBenchmark.runTest(30);
this.sceneDisposer = disposer;
const lastResult = {
classNames,
cameraRotationLength,
Expand Down Expand Up @@ -80,4 +82,9 @@ class Benchmark extends StartupBenchmark {
if (value != expected)
throw new Error(`Expected ${name} to be ${expected}, but got ${value}`);
}

postIteration() {
// FIXME: move to measured phase.
this.sceneDisposer();
}
Comment on lines +86 to +89

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

}
50 changes: 25 additions & 25 deletions workloads/babylonjs/dist/LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions workloads/babylonjs/dist/bundle.es5.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion workloads/babylonjs/dist/bundle.es5.min.js.map

Large diffs are not rendered by default.

Loading
Loading