diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart index d2a1485e5b..c5a8d9cc3a 100644 --- a/dev/devicelab/lib/tasks/perf_tests.dart +++ b/dev/devicelab/lib/tasks/perf_tests.dart @@ -362,7 +362,6 @@ class CompileTest { await flutter('packages', options: ['get']); final Map metrics = { - ...await _compileAot(), ...await _compileApp(reportPackageContentSizes: reportPackageContentSizes), ...await _compileDebug(), }; @@ -371,43 +370,6 @@ class CompileTest { }); } - static Future> _compileAot() async { - await flutter('clean'); - final Stopwatch watch = Stopwatch()..start(); - final List options = [ - 'aot', - '-v', - '--extra-gen-snapshot-options=--print_snapshot_sizes', - '--release', - '--no-pub', - '--target-platform', - ]; - switch (deviceOperatingSystem) { - case DeviceOperatingSystem.ios: - options.add('ios'); - break; - case DeviceOperatingSystem.android: - options.add('android-arm'); - break; - case DeviceOperatingSystem.fuchsia: - throw Exception('Unsupported option for Fuchsia devices'); - } - final String compileLog = await evalFlutter('build', options: options); - watch.stop(); - - final RegExp metricExpression = RegExp(r'([a-zA-Z]+)\(CodeSize\)\: (\d+)'); - final Map metrics = {}; - for (final Match m in metricExpression.allMatches(compileLog)) { - metrics[_sdkNameToMetricName(m.group(1))] = int.parse(m.group(2)); - } - if (metrics.length != _kSdkNameToMetricNameMapping.length) { - throw 'Expected metrics: ${_kSdkNameToMetricNameMapping.keys}, but got: ${metrics.keys}.'; - } - metrics['aot_snapshot_compile_millis'] = watch.elapsedMilliseconds; - - return metrics; - } - static Future> _compileApp({ bool reportPackageContentSizes = false }) async { await flutter('clean'); final Stopwatch watch = Stopwatch(); @@ -485,22 +447,6 @@ class CompileTest { }; } - static const Map _kSdkNameToMetricNameMapping = { - 'VMIsolate': 'aot_snapshot_size_vmisolate', - 'Isolate': 'aot_snapshot_size_isolate', - 'ReadOnlyData': 'aot_snapshot_size_rodata', - 'Instructions': 'aot_snapshot_size_instructions', - 'Total': 'aot_snapshot_size_total', - }; - - static String _sdkNameToMetricName(String sdkName) { - - if (!_kSdkNameToMetricNameMapping.containsKey(sdkName)) - throw 'Unrecognized SDK snapshot metric name: $sdkName'; - - return _kSdkNameToMetricNameMapping[sdkName]; - } - static Future> getSizesFromIosApp(String appPath) async { // Thin the binary to only contain one architecture. final String xcodeBackend = path.join(flutterDirectory.path, 'packages', 'flutter_tools', 'bin', 'xcode_backend.sh'); @@ -519,7 +465,6 @@ class CompileTest { }; } - static Future> getSizesFromApk(String apkPath) async { final String output = await eval('unzip', ['-v', apkPath]); final List lines = output.split('\n');