Adding macrobenchmarks for DDC (#166617)

We're adding macrobenchmark support to DDC (AMD modules and our new
hot-reload-capable module system) to be aware of any current/future
performance regressions. I'm not terribly aware of the metrics
collection pipeline; please let me know if we need to do any more work
to see these tests run/report numbers to the proper dashboards.
This commit is contained in:
MarkZ 2025-04-15 20:29:36 -07:00 committed by GitHub
parent a8a61a1c06
commit 10a1d1520e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 89 additions and 5 deletions

View File

@ -1663,6 +1663,34 @@ targets:
["devicelab","hostonly", "linux"]
task_name: web_benchmarks_canvaskit
- name: Linux web_benchmarks_ddc
recipe: devicelab/devicelab_drone
bringup: true
presubmit: false
timeout: 60
properties:
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
]
tags: >
["devicelab","hostonly", "linux"]
task_name: web_benchmarks_ddc
- name: Linux web_benchmarks_ddc_hot_reload
recipe: devicelab/devicelab_drone
bringup: true
presubmit: false
timeout: 60
properties:
dependencies: >-
[
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
]
tags: >
["devicelab","hostonly", "linux"]
task_name: web_benchmarks_ddc_hot_reload
- name: Linux web_benchmarks_skwasm
recipe: devicelab/devicelab_drone
presubmit: false

View File

@ -298,6 +298,8 @@
/dev/devicelab/bin/tasks/run_release_test_windows.dart @loic-sharma @flutter/tool
/dev/devicelab/bin/tasks/technical_debt__cost.dart @Piinks @flutter/framework
/dev/devicelab/bin/tasks/web_benchmarks_canvaskit.dart @yjbanov @flutter/web
/dev/devicelab/bin/tasks/web_benchmarks_ddc.dart @yjbanov @flutter/web
/dev/devicelab/bin/tasks/web_benchmarks_ddc_hot_reload.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

View File

@ -8,6 +8,11 @@ import 'package:flutter_devicelab/tasks/web_benchmarks.dart';
/// Runs all Web benchmarks using the CanvasKit rendering backend.
Future<void> main() async {
await task(() async {
return runWebBenchmark((useWasm: false, forceSingleThreadedSkwasm: false));
return runWebBenchmark((
useWasm: false,
forceSingleThreadedSkwasm: false,
useDdc: false,
withHotReload: false,
));
});
}

View File

@ -0,0 +1,18 @@
// 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 DDC.
Future<void> main() async {
await task(() async {
return runWebBenchmark((
useWasm: false,
forceSingleThreadedSkwasm: false,
useDdc: true,
withHotReload: false,
));
});
}

View File

@ -0,0 +1,18 @@
// 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 DDC.
Future<void> main() async {
await task(() async {
return runWebBenchmark((
useWasm: false,
forceSingleThreadedSkwasm: false,
useDdc: true,
withHotReload: true,
));
});
}

View File

@ -8,6 +8,11 @@ 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((useWasm: true, forceSingleThreadedSkwasm: false));
return runWebBenchmark((
useWasm: true,
forceSingleThreadedSkwasm: false,
useDdc: false,
withHotReload: false,
));
});
}

View File

@ -8,6 +8,11 @@ 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((useWasm: true, forceSingleThreadedSkwasm: true));
return runWebBenchmark((
useWasm: true,
forceSingleThreadedSkwasm: true,
useDdc: false,
withHotReload: false,
));
});
}

View File

@ -20,7 +20,8 @@ import '../framework/utils.dart';
const int benchmarkServerPort = 9999;
const int chromeDebugPort = 10000;
typedef WebBenchmarkOptions = ({bool useWasm, bool forceSingleThreadedSkwasm});
typedef WebBenchmarkOptions =
({bool useWasm, bool forceSingleThreadedSkwasm, bool useDdc, bool withHotReload});
Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
// Reduce logging level. Otherwise, package:webkit_inspection_protocol is way too spammy.
@ -40,7 +41,9 @@ Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
'--no-tree-shake-icons', // local engine builds are frequently out of sync with the Dart Kernel version
if (benchmarkOptions.useWasm) ...<String>['--wasm', '--no-strip-wasm'],
'--dart-define=FLUTTER_WEB_ENABLE_PROFILING=true',
'--profile',
if (benchmarkOptions.useDdc) '--debug' else '--profile',
if (benchmarkOptions.useDdc && benchmarkOptions.withHotReload)
'--extra-front-end-options=--dartdevc-canary,--dartdevc-module-format=ddc',
'--no-web-resources-cdn',
'-t',
'lib/web_benchmarks.dart',