Skip to content

Commit 7c4a1f0

Browse files
committed
update-workload
1 parent d135532 commit 7c4a1f0

8 files changed

Lines changed: 20 additions & 23 deletions

File tree

JetStreamDriver.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2692,7 +2692,7 @@ let BENCHMARKS = [
26922692
BUNDLE: "./babylonjs/dist/bundle.es5.min.js",
26932693
},
26942694
args: {
2695-
expectedCacheCommentCount: 23988,
2695+
expectedCacheCommentCount: 23992,
26962696
},
26972697
tags: ["startup", "js", "class", "es5", "babylonjs"],
26982698
iterations: 10,
@@ -2704,10 +2704,10 @@ let BENCHMARKS = [
27042704
"./babylonjs/benchmark/startup.js",
27052705
],
27062706
preload: {
2707-
BUNDLE: "./babylonjs/dist/bundle.es6.js",
2707+
BUNDLE: "./babylonjs/dist/bundle.es6.min.js",
27082708
},
27092709
args: {
2710-
expectedCacheCommentCount: 21222,
2710+
expectedCacheCommentCount: 21225,
27112711
},
27122712
tags: ["Default", "js", "startup", "class", "es6", "babylonjs"],
27132713
iterations: 10,
@@ -2733,7 +2733,7 @@ let BENCHMARKS = [
27332733
files: [
27342734
// Use non-minified sources for easier profiling:
27352735
// "./babylonjs/dist/bundle.es6.js",
2736-
"./babylonjs/dist/bundle.es6.js",
2736+
"./babylonjs/dist/bundle.es6.min.js",
27372737
"./babylonjs/benchmark/scene.js",
27382738
],
27392739
preload: {

babylonjs/benchmark/scene.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828

2929
globalThis.setTimeout = (callback, timeout) => callback();
3030
globalThis.requestAnimationFrame = (callback) => callback();
31-
self = undefined;
32-
globalThis.self = undefined;
33-
window.self = undefined;
3431

3532
// JetStream benchmark.
3633
class Benchmark {
@@ -40,7 +37,7 @@ class Benchmark {
4037
cannonData: null,
4138
particlesJson: null,
4239
};
43-
disposeScene;
40+
sceneDisposer;
4441

4542
constructor(iterationCount) {
4643
this.iterationCount = iterationCount;
@@ -58,13 +55,13 @@ class Benchmark {
5855
}
5956

6057
async runIteration() {
61-
const {classNames, cameraRotationLength, dispose} = await BabylonJSBenchmark.runComplexScene(
58+
const {classNames, cameraRotationLength, dispose: disposer} = await BabylonJSBenchmark.runComplexScene(
6259
this.preloaded.fortData,
6360
this.preloaded.cannonData,
6461
this.preloaded.particlesJson,
6562
100
6663
);
67-
this.disposeScene = dispose;
64+
this.sceneDisposer = disposer;
6865
const lastResult = {
6966
classNames,
7067
cameraRotationLength
@@ -84,7 +81,7 @@ class Benchmark {
8481

8582
validate() {
8683
// FIXME: move to measured phase.
87-
this.disposeScene();
84+
this.sceneDisposer();
8885
}
8986
}
9087

babylonjs/benchmark/startup.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
class Benchmark extends StartupBenchmark {
2929
iteration = 0;
30-
disposeScene;
30+
sceneDisposer;
3131

3232
constructor({iterationCount, expectedCacheCommentCount}) {
3333
super({
@@ -48,8 +48,8 @@ class Benchmark extends StartupBenchmark {
4848
eval(sourceCode);
4949
// const runStart = performance.now();
5050

51-
const { classNames, cameraRotationLength, dispose} = BabylonJSBenchmark.runTest(30);
52-
this.disposeScene = dispose;
51+
const { classNames, cameraRotationLength, dispose: disposer} = BabylonJSBenchmark.runTest(30);
52+
this.sceneDisposer = disposer;
5353
const lastResult = {
5454
classNames,
5555
cameraRotationLength,
@@ -85,6 +85,6 @@ class Benchmark extends StartupBenchmark {
8585

8686
validate() {
8787
// FIXME: move to measured phase.
88-
this.disposeScene();
88+
this.sceneDisposer();
8989
}
9090
}

babylonjs/dist/bundle.es5.min.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50487,7 +50487,7 @@ e({mode:A,data:n.buffer,sh:n.sh,faces:u,hasVertexColors:!!_,compressed:!1,rawSpl
5048750487
return t.apply(this,arguments)}}())},e}();rQe._DefaultLoadingOptions={keepInRam:!1,flipY:!1},dj(new rQe);var iQe=n(48258);function oQe(){/*ThouShaltNotCache*/var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){/*ThouShaltNotCache*/var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return aQe(c,"_invoke",function(n,r,i){/*ThouShaltNotCache*/var o,s,u,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){/*ThouShaltNotCache*/return o=t,s=0,u=e,h.n=n,a}};function d(n,r){/*ThouShaltNotCache*/for(s=n,u=r,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,p=o[2];n>3?(i=p===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,h.v=r,h.n=o[1]):d<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,p){/*ThouShaltNotCache*/if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),s=l,u=p;(t=s<2?e:u)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,u)):h.n=u:h.v=u);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==a)break}catch(t){o=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(aQe(t={},r,function(){/*ThouShaltNotCache*/return this}),t),f=c.prototype=s.prototype=Object.create(l);function h(e){/*ThouShaltNotCache*/return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,aQe(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,aQe(f,"constructor",c),aQe(c,"constructor",u),u.displayName="GeneratorFunction",aQe(c,i,"GeneratorFunction"),aQe(f),aQe(f,i,"Generator"),aQe(f,r,function(){/*ThouShaltNotCache*/return this}),aQe(f,"toString",function(){/*ThouShaltNotCache*/return"[object Generator]"}),(oQe=function(){/*ThouShaltNotCache*/return{w:o,m:h}})()}function aQe(e,t,n,r){/*ThouShaltNotCache*/ /*ThouShaltNotCache*/var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}aQe=function(e,t,n,r){/*ThouShaltNotCache*/ /*ThouShaltNotCache*/function o(t,n){/*ThouShaltNotCache*/ /*ThouShaltNotCache*/aQe(e,t,function(e){/*ThouShaltNotCache*/ /*ThouShaltNotCache*/return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},aQe(e,t,n,r)}function sQe(e,t,n,r,i,o,a){/*ThouShaltNotCache*/try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function uQe(e){/*ThouShaltNotCache*/return function(){/*ThouShaltNotCache*/var t=this,n=arguments;return new Promise(function(r,i){/*ThouShaltNotCache*/var o=e.apply(t,n);function a(e){/*ThouShaltNotCache*/sQe(o,r,i,a,s,"next",e)}function s(e){/*ThouShaltNotCache*/sQe(o,r,i,a,s,"throw",e)}a(void 0)})}}function cQe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=Object.keys(e);
5048850488
/*ThouShaltNotCache*/y.V.LogLevels=y.V.NoneLogLevel;for(var r=new gS,i=function(e){
5048950489
/*ThouShaltNotCache*/
50490-
var t=new Hi.Z(e);t.useConstantAnimationDeltaTime=!0;var n=new mc("camera1",new Dx.Pq(0,5,-10),t);n.setTarget(Dx.Pq.Zero());new h_("light1",new Dx.Pq(0,1,0),t);var r=sg.CreateSphere("sphere1",{segments:16,diameter:2,sideOrientation:Kn.FRONTSIDE},t);r.position.y=1;sg.CreateGround("ground1",{width:6,height:6,subdivisions:2,updatable:!1},t);return t}(r),o=0;o<t;o++)i.render();return{classNames:n,cameraRotationLength:i.cameras[0].rotation.length(),dispose:function(){
50490+
var t=new Hi.Z(e);t.useConstantAnimationDeltaTime=!0;var n=new mc("camera1",new Dx.Pq(0,5,-10),t);n.setTarget(Dx.Pq.Zero());new h_("light1",new Dx.Pq(0,1,0),t);var r=sg.CreateSphere("sphere1",{segments:16,diameter:2,sideOrientation:Kn.FRONTSIDE},t);r.position.y=1;sg.CreateGround("ground1",{width:6,height:6,subdivisions:2,updatable:!1},t);return t}(r),o=0;o<t;o++)i.render();return{classNames:n,cameraRotationLength:i.cameras[0].rotation.length(),disposer:function(){
5049150491
/*ThouShaltNotCache*/
5049250492
/*ThouShaltNotCache*/
5049350493
pQe(i,r)}}}function lQe(e,t,n){
@@ -50502,7 +50502,7 @@ for(;;)switch(t.n){case 0:
5050250502
/*ThouShaltNotCache*/
5050350503
return o=f.length>3&&void 0!==f[3]?f[3]:10,
5050450504
/*ThouShaltNotCache*/
50505-
a=Object.keys(e),y.V.LogLevels=y.V.NoneLogLevel,s=new gS({deterministicLockstep:!0}),t.n=1,hQe(s,n,r,i);case 1:for(u=t.v,c=0;c<o;c++)u.animate(),u.render();return l={classNames:a,cameraRotationLength:u.cameras[0].rotation.length(),dispose:function(){
50505+
a=Object.keys(e),y.V.LogLevels=y.V.NoneLogLevel,s=new gS({deterministicLockstep:!0}),t.n=1,hQe(s,n,r,i);case 1:for(u=t.v,c=0;c<o;c++)u.animate(),u.render();return l={classNames:a,cameraRotationLength:u.cameras[0].rotation.length(),disposer:function(){
5050650506
/*ThouShaltNotCache*/
5050750507
/*ThouShaltNotCache*/
5050850508
/*ThouShaltNotCache*/

babylonjs/dist/bundle.es5.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

babylonjs/dist/bundle.es6.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

babylonjs/dist/bundle.es6.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

babylonjs/src/babylon-js-benchmark.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function runTest(frames = 10) {
3939
const result = {
4040
classNames,
4141
cameraRotationLength: scene.cameras[0].rotation.length(),
42-
dispose() {
42+
disposer() {
4343
disposeScene(scene, engine);
4444
}
4545
};
@@ -99,7 +99,7 @@ export async function runComplexScene(
9999
const result = {
100100
classNames,
101101
cameraRotationLength: scene.cameras[0].rotation.length(),
102-
dispose() {
102+
disposer() {
103103
disposeScene(scene, engine);
104104
}
105105
};

0 commit comments

Comments
 (0)