mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-03-13 17:04:39 -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-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",
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'
|
||||
}])
|
||||
|
|
Loading…
Reference in a new issue