Fix benchmark suite (#1397)

* 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-render": "latest",
"scratch-storage": "^0.4.0",
"scratch-svg-renderer": "latest",
"script-loader": "0.7.2",
"stats.js": "^0.17.0",
"tap": "^11.0.1",

View file

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

View file

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

View file

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

View file

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