From 2f3ba1a3134d60fd51c2a6601dab640569045e7e Mon Sep 17 00:00:00 2001 From: "Stephen (Alex) Wallen" Date: Mon, 29 Aug 2022 11:23:16 -0700 Subject: [PATCH] Readability revisions for #109891 (#110348) --- dev/devicelab/lib/tasks/perf_tests.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart index 50777b5ead..85d8368a19 100644 --- a/dev/devicelab/lib/tasks/perf_tests.dart +++ b/dev/devicelab/lib/tasks/perf_tests.dart @@ -1425,18 +1425,19 @@ class CompileTest { cwd, 'build', )); - final String? appBundlePath = + final String? appPath = _findDarwinAppInBuildDirectory(buildDirectory.path); - if (appBundlePath == null) { + if (appPath == null) { throw 'Failed to find app bundle in ${buildDirectory.path}'; } - // IPAs are created manually, https://flutter.dev/ios-release/ - await exec('tar', ['-zcf', 'build/app.ipa', appBundlePath]); - releaseSizeInBytes = await file('$cwd/build/app.ipa').length(); + // Validate changes in Dart snapshot format and data layout do not + // change compression size. This also simulates the size of an IPA on iOS. + await exec('tar', ['-zcf', 'build/app.tar.gz', appPath]); + releaseSizeInBytes = await file('$cwd/build/app.tar.gz').length(); if (reportPackageContentSizes) { final Map sizeMetrics = await getSizesFromDarwinApp( - appPath: appBundlePath, - operatingSystem: deviceOperatingSystem, + appPath: appPath, + operatingSystem: deviceOperatingSystem, ); metrics.addAll(sizeMetrics); }