Fix benchmark suite ()

* add scratch-svg-renderer adaptors to benchmark vm

* disable benchmark with monitor error

* fixup! add scratch-svg-renderer adaptors to benchmark vm

* fixup! disable benchmark with monitor error
This commit is contained in:
Michael "Z" Goddard 2018-08-08 14:36:38 -04:00 committed by Mx Corey Frang
parent 6e6e9b49cb
commit a15a9a1b7b
5 changed files with 21 additions and 11 deletions

View file

@ -68,6 +68,7 @@
"scratch-blocks": "latest", "scratch-blocks": "latest",
"scratch-render": "latest", "scratch-render": "latest",
"scratch-storage": "^0.4.0", "scratch-storage": "^0.4.0",
"scratch-svg-renderer": "latest",
"script-loader": "0.7.2", "script-loader": "0.7.2",
"stats.js": "^0.17.0", "stats.js": "^0.17.0",
"tap": "^11.0.1", "tap": "^11.0.1",

View file

@ -481,6 +481,9 @@ const runBenchmark = function () {
vm.attachRenderer(renderer); vm.attachRenderer(renderer);
const audioEngine = new window.AudioEngine(); const audioEngine = new window.AudioEngine();
vm.attachAudioEngine(audioEngine); vm.attachAudioEngine(audioEngine);
/* global ScratchSVGRenderer */
vm.attachV2SVGAdapter(new ScratchSVGRenderer.SVGRenderer());
vm.attachV2BitmapAdapter(new ScratchSVGRenderer.BitmapAdapter());
// Feed mouse events as VM I/O events. // Feed mouse events as VM I/O events.
document.addEventListener('mousemove', e => { document.addEventListener('mousemove', e => {

View file

@ -85,6 +85,8 @@
<script src="./scratch-storage.js"></script> <script src="./scratch-storage.js"></script>
<!-- Stage rendering --> <!-- Stage rendering -->
<script src="./scratch-render.js"></script> <script src="./scratch-render.js"></script>
<!-- SVG rendering -->
<script src="./scratch-svg-renderer.js"></script>
<!-- VM --> <!-- VM -->
<script src="./scratch-vm.js"></script> <script src="./scratch-vm.js"></script>
<!-- Playground --> <!-- Playground -->

View file

@ -577,17 +577,19 @@ window.onload = function () {
recordingTime: 5000 recordingTime: 5000
})); }));
suite.add(new BenchFixture({ // TODO: #1322
projectId: 187694931, // Error: Cannot create monitor for target that cannot be found by name
warmUpTime: 0, // suite.add(new BenchFixture({
recordingTime: 5000 // projectId: 187694931,
})); // warmUpTime: 0,
// recordingTime: 5000
suite.add(new BenchFixture({ // }));
projectId: 187694931, //
warmUpTime: 5000, // suite.add(new BenchFixture({
recordingTime: 5000 // projectId: 187694931,
})); // warmUpTime: 5000,
// recordingTime: 5000
// }));
suite.add(new BenchFixture({ suite.add(new BenchFixture({
projectId: 219313833, projectId: 219313833,

View file

@ -150,6 +150,8 @@ module.exports = [
from: 'node_modules/scratch-storage/dist/web' from: 'node_modules/scratch-storage/dist/web'
}, { }, {
from: 'node_modules/scratch-render/dist/web' from: 'node_modules/scratch-render/dist/web'
}, {
from: 'node_modules/scratch-svg-renderer/dist/web'
}, { }, {
from: 'src/playground' from: 'src/playground'
}]) }])