Add benchmarks for single-threaded Skwasm. (#158027)
This adds benchmarks that run on single threaded skwasm.
This commit is contained in:
parent
8591d0c16a
commit
4a33136db8
19
.ci.yaml
19
.ci.yaml
@ -1554,6 +1554,25 @@ targets:
|
||||
- bin/**
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_benchmarks_skwasm_st
|
||||
recipe: devicelab/devicelab_drone
|
||||
bringup: true
|
||||
presubmit: false
|
||||
timeout: 60
|
||||
properties:
|
||||
dependencies: >-
|
||||
[
|
||||
{"dependency": "android_sdk", "version": "version:35v1"},
|
||||
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
|
||||
]
|
||||
tags: >
|
||||
["devicelab"]
|
||||
task_name: web_benchmarks_skwasm_st
|
||||
runIf:
|
||||
- dev/**
|
||||
- bin/**
|
||||
- .ci.yaml
|
||||
|
||||
- name: Linux web_long_running_tests_1_5
|
||||
recipe: flutter/flutter_drone
|
||||
timeout: 60
|
||||
|
@ -292,6 +292,7 @@
|
||||
/dev/devicelab/bin/tasks/web_benchmarks_canvaskit.dart @yjbanov @flutter/web
|
||||
/dev/devicelab/bin/tasks/web_benchmarks_html.dart @yjbanov @flutter/web
|
||||
/dev/devicelab/bin/tasks/web_benchmarks_skwasm.dart @eyebrowsoffire @flutter/web
|
||||
/dev/devicelab/bin/tasks/web_benchmarks_skwasm_st.dart @eyebrowsoffire @flutter/web
|
||||
/dev/devicelab/bin/tasks/windows_home_scroll_perf__timeline_summary.dart @jonahwilliams @flutter/engine
|
||||
/dev/devicelab/bin/tasks/windows_startup_test.dart @loic-sharma @flutter/desktop
|
||||
/dev/devicelab/bin/tasks/windows_desktop_impeller.dart @jonahwilliams @flutter/engine
|
||||
|
@ -1,8 +1,13 @@
|
||||
{{flutter_js}}
|
||||
{{flutter_build_config}}
|
||||
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
const forceSt = searchParams.get('force_st');
|
||||
const extraConfig = forceSt ? {forceSingleThreadedSkwasm: true} : {};
|
||||
_flutter.loader.load({
|
||||
config: {
|
||||
// Use the local CanvasKit bundle instead of the CDN to reduce test flakiness.
|
||||
canvasKitBaseUrl: "/canvaskit/",
|
||||
...extraConfig,
|
||||
},
|
||||
});
|
@ -10,7 +10,8 @@ Future<void> main() async {
|
||||
await task(() async {
|
||||
return runWebBenchmark((
|
||||
webRenderer: 'canvaskit',
|
||||
useWasm: false
|
||||
useWasm: false,
|
||||
forceSingleThreadedSkwasm: false,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ Future<void> main() async {
|
||||
await task(() async {
|
||||
return runWebBenchmark((
|
||||
webRenderer: 'html',
|
||||
useWasm: false
|
||||
useWasm: false,
|
||||
forceSingleThreadedSkwasm: false,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ Future<void> main() async {
|
||||
await task(() async {
|
||||
return runWebBenchmark((
|
||||
webRenderer: 'skwasm',
|
||||
useWasm: true
|
||||
useWasm: true,
|
||||
forceSingleThreadedSkwasm: false,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
17
dev/devicelab/bin/tasks/web_benchmarks_skwasm_st.dart
Normal file
17
dev/devicelab/bin/tasks/web_benchmarks_skwasm_st.dart
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/web_benchmarks.dart';
|
||||
|
||||
/// Runs all Web benchmarks using the Skwasm rendering backend.
|
||||
Future<void> main() async {
|
||||
await task(() async {
|
||||
return runWebBenchmark((
|
||||
webRenderer: 'skwasm',
|
||||
useWasm: true,
|
||||
forceSingleThreadedSkwasm: true,
|
||||
));
|
||||
});
|
||||
}
|
@ -23,6 +23,7 @@ const int chromeDebugPort = 10000;
|
||||
typedef WebBenchmarkOptions = ({
|
||||
String webRenderer,
|
||||
bool useWasm,
|
||||
bool forceSingleThreadedSkwasm,
|
||||
});
|
||||
|
||||
Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
|
||||
@ -142,8 +143,9 @@ Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
|
||||
final bool isUncalibratedSmokeTest = io.Platform.environment['CALIBRATED'] != 'true';
|
||||
// final bool isUncalibratedSmokeTest =
|
||||
// io.Platform.environment['UNCALIBRATED_SMOKE_TEST'] == 'true';
|
||||
final String urlParams = benchmarkOptions.forceSingleThreadedSkwasm ? '?force_st=true' : '';
|
||||
final ChromeOptions options = ChromeOptions(
|
||||
url: 'http://localhost:$benchmarkServerPort/index.html',
|
||||
url: 'http://localhost:$benchmarkServerPort/index.html$urlParams',
|
||||
userDataDirectory: userDataDir,
|
||||
headless: isUncalibratedSmokeTest,
|
||||
debugPort: chromeDebugPort,
|
||||
@ -171,7 +173,13 @@ Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
|
||||
throw 'Benchmark name is empty';
|
||||
}
|
||||
|
||||
final String namespace = '$benchmarkName.${benchmarkOptions.webRenderer}';
|
||||
final String webRendererName;
|
||||
if (benchmarkOptions.useWasm && benchmarkOptions.forceSingleThreadedSkwasm) {
|
||||
webRendererName = 'skwasm_st';
|
||||
} else {
|
||||
webRendererName = benchmarkOptions.webRenderer;
|
||||
}
|
||||
final String namespace = '$benchmarkName.$webRendererName';
|
||||
final List<String> scoreKeys = List<String>.from(profile['scoreKeys'] as List<dynamic>);
|
||||
if (scoreKeys.isEmpty) {
|
||||
throw 'No score keys in benchmark "$benchmarkName"';
|
||||
|
Loading…
x
Reference in New Issue
Block a user