mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-05 10:41:03 -04:00
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:
parent
6e6e9b49cb
commit
a15a9a1b7b
5 changed files with 21 additions and 11 deletions
|
@ -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",
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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 -->
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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'
|
||||||
}])
|
}])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue