Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
568a6e1e
Commit
568a6e1e
authored
Dec 05, 2016
by
Yegor
Committed by
GitHub
Dec 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
measure IPA size (#7158)
parent
7da3ab63
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
10 deletions
+42
-10
basic_material_app__size.dart
dev/devicelab/bin/tasks/basic_material_app__size.dart
+3
-1
basic_material_app_ios__size.dart
dev/devicelab/bin/tasks/basic_material_app_ios__size.dart
+14
-0
size_tests.dart
dev/devicelab/lib/tasks/size_tests.dart
+14
-4
manifest.yaml
dev/devicelab/manifest.yaml
+11
-5
No files found.
dev/devicelab/bin/tasks/basic_material_app__size.dart
View file @
568a6e1e
...
...
@@ -4,9 +4,11 @@
import
'dart:async'
;
import
'package:flutter_devicelab/
tasks/size_tests
.dart'
;
import
'package:flutter_devicelab/
framework/adb
.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/size_tests.dart'
;
Future
<
Null
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createBasicMaterialAppSizeTest
());
}
dev/devicelab/bin/tasks/basic_material_app_ios__size.dart
0 → 100644
View file @
568a6e1e
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/size_tests.dart'
;
Future
<
Null
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createBasicMaterialAppSizeTest
());
}
dev/devicelab/lib/tasks/size_tests.dart
View file @
568a6e1e
...
...
@@ -7,6 +7,8 @@ import 'dart:io';
import
'../framework/framework.dart'
;
import
'../framework/utils.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
TaskFunction
createBasicMaterialAppSizeTest
(
)
{
return
()
async
{
const
String
sampleAppName
=
'sample_flutter_app'
;
...
...
@@ -15,7 +17,7 @@ TaskFunction createBasicMaterialAppSizeTest() {
if
(
await
sampleDir
.
exists
())
rmTree
(
sampleDir
);
int
apk
SizeInBytes
;
int
release
SizeInBytes
;
await
inDirectory
(
Directory
.
systemTemp
,
()
async
{
await
flutter
(
'create'
,
options:
<
String
>[
sampleAppName
]);
...
...
@@ -26,13 +28,21 @@ TaskFunction createBasicMaterialAppSizeTest() {
await
inDirectory
(
sampleDir
,
()
async
{
await
flutter
(
'packages'
,
options:
<
String
>[
'get'
]);
await
flutter
(
'build'
,
options:
<
String
>[
'clean'
]);
await
flutter
(
'build'
,
options:
<
String
>[
'apk'
,
'--release'
]);
apkSizeInBytes
=
await
file
(
'
${sampleDir.path}
/build/app.apk'
).
length
();
if
(
deviceOperatingSystem
==
DeviceOperatingSystem
.
ios
)
{
await
flutter
(
'build'
,
options:
<
String
>[
'ios'
,
'--release'
]);
// IPAs are created manually AFAICT
await
exec
(
'tar'
,
<
String
>[
'-zcf'
,
'build/app.ipa'
,
'build/ios/Release-iphoneos/Runner.app/'
]);
releaseSizeInBytes
=
await
file
(
'
${sampleDir.path}
/build/app.ipa'
).
length
();
}
else
{
await
flutter
(
'build'
,
options:
<
String
>[
'apk'
,
'--release'
]);
releaseSizeInBytes
=
await
file
(
'
${sampleDir.path}
/build/app.apk'
).
length
();
}
});
});
return
new
TaskResult
.
success
(
<
String
,
dynamic
>{
'release_size_in_bytes'
:
apk
SizeInBytes
},
<
String
,
dynamic
>{
'release_size_in_bytes'
:
release
SizeInBytes
},
benchmarkScoreKeys:
<
String
>[
'release_size_in_bytes'
]);
};
}
dev/devicelab/manifest.yaml
View file @
568a6e1e
...
...
@@ -52,7 +52,7 @@ tasks:
basic_material_app__size
:
description
:
>
Measures the APK
/IPA sizes
of a basic material app.
Measures the APK
size
of a basic material app.
stage
:
devicelab
required_agent_capabilities
:
[
"
has-android-device"
]
...
...
@@ -138,10 +138,10 @@ tasks:
required_agent_capabilities
:
[
"
has-ios-device"
]
flutter_gallery_ios__start_up
:
stage
:
devicelab_ios
required_agent_capabilities
:
[
"
has-ios-device"
]
description
:
>
Measures the startup time of the Flutter Gallery app on iOS.
stage
:
devicelab_ios
required_agent_capabilities
:
[
"
has-ios-device"
]
complex_layout_ios__start_up
:
description
:
>
...
...
@@ -150,8 +150,14 @@ tasks:
required_agent_capabilities
:
[
"
has-ios-device"
]
flutter_gallery_ios__transition_perf
:
stage
:
devicelab_ios
required_agent_capabilities
:
[
"
has-ios-device"
]
description
:
>
Measures the performance of screen transitions in Flutter Gallery on
iOS.
stage
:
devicelab_ios
required_agent_capabilities
:
[
"
has-ios-device"
]
basic_material_app_ios__size
:
description
:
>
Measures the IPA size of a basic material app.
stage
:
devicelab_ios
required_agent_capabilities
:
[
"
has-android-device"
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment