Skip to content

Commit 10a1d15

Browse files
authored
Adding macrobenchmarks for DDC (flutter#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.
1 parent a8a61a1 commit 10a1d15

File tree

8 files changed

+89
-5
lines changed

8 files changed

+89
-5
lines changed

.ci.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,34 @@ targets:
16631663
["devicelab","hostonly", "linux"]
16641664
task_name: web_benchmarks_canvaskit
16651665

1666+
- name: Linux web_benchmarks_ddc
1667+
recipe: devicelab/devicelab_drone
1668+
bringup: true
1669+
presubmit: false
1670+
timeout: 60
1671+
properties:
1672+
dependencies: >-
1673+
[
1674+
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
1675+
]
1676+
tags: >
1677+
["devicelab","hostonly", "linux"]
1678+
task_name: web_benchmarks_ddc
1679+
1680+
- name: Linux web_benchmarks_ddc_hot_reload
1681+
recipe: devicelab/devicelab_drone
1682+
bringup: true
1683+
presubmit: false
1684+
timeout: 60
1685+
properties:
1686+
dependencies: >-
1687+
[
1688+
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"}
1689+
]
1690+
tags: >
1691+
["devicelab","hostonly", "linux"]
1692+
task_name: web_benchmarks_ddc_hot_reload
1693+
16661694
- name: Linux web_benchmarks_skwasm
16671695
recipe: devicelab/devicelab_drone
16681696
presubmit: false

TESTOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@
298298
/dev/devicelab/bin/tasks/run_release_test_windows.dart @loic-sharma @flutter/tool
299299
/dev/devicelab/bin/tasks/technical_debt__cost.dart @Piinks @flutter/framework
300300
/dev/devicelab/bin/tasks/web_benchmarks_canvaskit.dart @yjbanov @flutter/web
301+
/dev/devicelab/bin/tasks/web_benchmarks_ddc.dart @yjbanov @flutter/web
302+
/dev/devicelab/bin/tasks/web_benchmarks_ddc_hot_reload.dart @yjbanov @flutter/web
301303
/dev/devicelab/bin/tasks/web_benchmarks_skwasm.dart @eyebrowsoffire @flutter/web
302304
/dev/devicelab/bin/tasks/web_benchmarks_skwasm_st.dart @eyebrowsoffire @flutter/web
303305
/dev/devicelab/bin/tasks/windows_home_scroll_perf__timeline_summary.dart @jonahwilliams @flutter/engine

dev/devicelab/bin/tasks/web_benchmarks_canvaskit.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import 'package:flutter_devicelab/tasks/web_benchmarks.dart';
88
/// Runs all Web benchmarks using the CanvasKit rendering backend.
99
Future<void> main() async {
1010
await task(() async {
11-
return runWebBenchmark((useWasm: false, forceSingleThreadedSkwasm: false));
11+
return runWebBenchmark((
12+
useWasm: false,
13+
forceSingleThreadedSkwasm: false,
14+
useDdc: false,
15+
withHotReload: false,
16+
));
1217
});
1318
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter_devicelab/framework/framework.dart';
6+
import 'package:flutter_devicelab/tasks/web_benchmarks.dart';
7+
8+
/// Runs all Web benchmarks using DDC.
9+
Future<void> main() async {
10+
await task(() async {
11+
return runWebBenchmark((
12+
useWasm: false,
13+
forceSingleThreadedSkwasm: false,
14+
useDdc: true,
15+
withHotReload: false,
16+
));
17+
});
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter_devicelab/framework/framework.dart';
6+
import 'package:flutter_devicelab/tasks/web_benchmarks.dart';
7+
8+
/// Runs all Web benchmarks using DDC.
9+
Future<void> main() async {
10+
await task(() async {
11+
return runWebBenchmark((
12+
useWasm: false,
13+
forceSingleThreadedSkwasm: false,
14+
useDdc: true,
15+
withHotReload: true,
16+
));
17+
});
18+
}

dev/devicelab/bin/tasks/web_benchmarks_skwasm.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import 'package:flutter_devicelab/tasks/web_benchmarks.dart';
88
/// Runs all Web benchmarks using the Skwasm rendering backend.
99
Future<void> main() async {
1010
await task(() async {
11-
return runWebBenchmark((useWasm: true, forceSingleThreadedSkwasm: false));
11+
return runWebBenchmark((
12+
useWasm: true,
13+
forceSingleThreadedSkwasm: false,
14+
useDdc: false,
15+
withHotReload: false,
16+
));
1217
});
1318
}

dev/devicelab/bin/tasks/web_benchmarks_skwasm_st.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import 'package:flutter_devicelab/tasks/web_benchmarks.dart';
88
/// Runs all Web benchmarks using the Skwasm rendering backend.
99
Future<void> main() async {
1010
await task(() async {
11-
return runWebBenchmark((useWasm: true, forceSingleThreadedSkwasm: true));
11+
return runWebBenchmark((
12+
useWasm: true,
13+
forceSingleThreadedSkwasm: true,
14+
useDdc: false,
15+
withHotReload: false,
16+
));
1217
});
1318
}

dev/devicelab/lib/tasks/web_benchmarks.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import '../framework/utils.dart';
2020
const int benchmarkServerPort = 9999;
2121
const int chromeDebugPort = 10000;
2222

23-
typedef WebBenchmarkOptions = ({bool useWasm, bool forceSingleThreadedSkwasm});
23+
typedef WebBenchmarkOptions =
24+
({bool useWasm, bool forceSingleThreadedSkwasm, bool useDdc, bool withHotReload});
2425

2526
Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
2627
// Reduce logging level. Otherwise, package:webkit_inspection_protocol is way too spammy.
@@ -40,7 +41,9 @@ Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
4041
'--no-tree-shake-icons', // local engine builds are frequently out of sync with the Dart Kernel version
4142
if (benchmarkOptions.useWasm) ...<String>['--wasm', '--no-strip-wasm'],
4243
'--dart-define=FLUTTER_WEB_ENABLE_PROFILING=true',
43-
'--profile',
44+
if (benchmarkOptions.useDdc) '--debug' else '--profile',
45+
if (benchmarkOptions.useDdc && benchmarkOptions.withHotReload)
46+
'--extra-front-end-options=--dartdevc-canary,--dartdevc-module-format=ddc',
4447
'--no-web-resources-cdn',
4548
'-t',
4649
'lib/web_benchmarks.dart',

0 commit comments

Comments
 (0)