Add --local-web-sdk in devicelab runner to make --ab testing work for web (#123825)
This allows us to check for performance differences in local Web SDKs. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
This commit is contained in:
@@ -1192,6 +1192,7 @@ class WebCompileTest {
|
||||
return inDirectory<Map<String, int>>(directory, () async {
|
||||
final Map<String, int> metrics = <String, int>{};
|
||||
|
||||
await flutter('clean');
|
||||
await flutter('packages', options: <String>['get']);
|
||||
final Stopwatch? watch = measureBuildTime ? Stopwatch() : null;
|
||||
watch?.start();
|
||||
@@ -1200,6 +1201,7 @@ class WebCompileTest {
|
||||
'-v',
|
||||
'--release',
|
||||
'--no-pub',
|
||||
'--no-web-resources-cdn',
|
||||
]);
|
||||
watch?.stop();
|
||||
final String buildDir = path.join(directory, 'build', 'web');
|
||||
|
||||
@@ -25,11 +25,13 @@ Future<TaskResult> runWebBenchmark({ required bool useCanvasKit }) async {
|
||||
Logger.root.level = Level.INFO;
|
||||
final String macrobenchmarksDirectory = path.join(flutterDirectory.path, 'dev', 'benchmarks', 'macrobenchmarks');
|
||||
return inDirectory(macrobenchmarksDirectory, () async {
|
||||
await flutter('clean');
|
||||
await evalFlutter('build', options: <String>[
|
||||
'web',
|
||||
'--dart-define=FLUTTER_WEB_ENABLE_PROFILING=true',
|
||||
'--web-renderer=${useCanvasKit ? 'canvaskit' : 'html'}',
|
||||
'--profile',
|
||||
'--no-web-resources-cdn',
|
||||
'-t',
|
||||
'lib/web_benchmarks.dart',
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user