[web] fix --ab option for web benchmarks (#154574)

Fix the `--ab` option in the benchmark harness:

- Make `--local-engine-host` optional. The web engine doesn't need it, so it doesn't build it. But the tool crashes by failing to find it.
- Disable icon tree shaking because `--ab` runs against local engine build, whose Dart kernel version is out of sync with the framework, which crashes the const finder.
This commit is contained in:
Yegor
2024-11-06 10:07:17 -08:00
committed by GitHub
parent cfa3b08578
commit 99861b0b98
3 changed files with 8 additions and 6 deletions

View File

@@ -99,8 +99,8 @@ Future<void> main(List<String> rawArgs) async {
stderr.writeln(argParser.usage);
exit(1);
}
if (localEngineHost == null) {
stderr.writeln('When running in A/B test mode --local-engine-host is required.\n');
if (localWebSdk == null && localEngineHost == null) {
stderr.writeln('When running in A/B test mode for mobile --local-engine-host is required.\n');
stderr.writeln(argParser.usage);
exit(1);
}
@@ -137,7 +137,7 @@ Future<void> _runABTest({
required int runsPerTest,
required bool silent,
required String? localEngine,
required String localEngineHost,
required String? localEngineHost,
required String? localWebSdk,
required String? localEngineSrcPath,
required String? deviceId,