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
22c1ca76
Unverified
Commit
22c1ca76
authored
Oct 06, 2021
by
Dan Field
Committed by
GitHub
Oct 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a startup test that delays runApp (#91346)
parent
1c374c65
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
2 deletions
+66
-2
.ci.yaml
.ci.yaml
+11
-0
TESTOWNERS
TESTOWNERS
+1
-0
flutter_gallery__start_up_delayed.dart
...evicelab/bin/tasks/flutter_gallery__start_up_delayed.dart
+12
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+9
-2
delayed_main.dart
dev/integration_tests/flutter_gallery/lib/delayed_main.dart
+33
-0
No files found.
.ci.yaml
View file @
22c1ca76
...
...
@@ -1474,6 +1474,17 @@ targets:
task_name
:
flutter_gallery__start_up
scheduler
:
luci
-
name
:
Linux_android flutter_gallery__start_up_delayed
recipe
:
devicelab/devicelab_drone
bringup
:
true
presubmit
:
false
timeout
:
60
properties
:
tags
:
>
["devicelab","android","linux"]
task_name
:
flutter_gallery__start_up_delayed
scheduler
:
luci
-
name
:
Linux_android flutter_gallery_android__compile
recipe
:
devicelab/devicelab_drone
presubmit
:
false
...
...
TESTOWNERS
View file @
22c1ca76
...
...
@@ -34,6 +34,7 @@
/dev/devicelab/bin/tasks/flutter_gallery__image_cache_memory.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/flutter_gallery__memory_nav.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/flutter_gallery__start_up.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/flutter_gallery__start_up_delayed.dart @dnfield @flutter/engine
/dev/devicelab/bin/tasks/flutter_gallery__transition_perf_e2e.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/flutter_gallery__transition_perf_hybrid.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/flutter_gallery__transition_perf_with_semantics.dart @zanderso @flutter/engine
...
...
dev/devicelab/bin/tasks/flutter_gallery__start_up_delayed.dart
0 → 100644
View file @
22c1ca76
// Copyright 2014 The Flutter 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
'package:flutter_devicelab/framework/devices.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFlutterGalleryStartupTest
(
target:
'lib/delayed_main.dart'
));
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
22c1ca76
...
...
@@ -215,9 +215,10 @@ TaskFunction createPictureCachePerfE2ETest() {
).
run
;
}
TaskFunction
createFlutterGalleryStartupTest
(
)
{
TaskFunction
createFlutterGalleryStartupTest
(
{
String
target
=
'lib/main.dart'
}
)
{
return
StartupTest
(
'
${flutterDirectory.path}
/dev/integration_tests/flutter_gallery'
,
target:
target
,
).
run
;
}
...
...
@@ -502,10 +503,11 @@ Map<String, dynamic> _average(List<Map<String, dynamic>> results, int iterations
/// Measure application startup performance.
class
StartupTest
{
const
StartupTest
(
this
.
testDirectory
,
{
this
.
reportMetrics
=
true
});
const
StartupTest
(
this
.
testDirectory
,
{
this
.
reportMetrics
=
true
,
this
.
target
=
'lib/main.dart'
});
final
String
testDirectory
;
final
bool
reportMetrics
;
final
String
target
;
Future
<
TaskResult
>
run
()
async
{
return
inDirectory
<
TaskResult
>(
testDirectory
,
()
async
{
...
...
@@ -522,6 +524,7 @@ class StartupTest {
'-v'
,
'--profile'
,
'--target-platform=android-arm,android-arm64'
,
'--target=
$target
'
,
]);
applicationBinaryPath
=
'
$testDirectory
/build/app/outputs/flutter-apk/app-profile.apk'
;
break
;
...
...
@@ -531,6 +534,7 @@ class StartupTest {
'-v'
,
'--profile'
,
'--target-platform=android-arm'
,
'--target=
$target
'
,
]);
applicationBinaryPath
=
'
$testDirectory
/build/app/outputs/flutter-apk/app-profile.apk'
;
break
;
...
...
@@ -540,6 +544,7 @@ class StartupTest {
'-v'
,
'--profile'
,
'--target-platform=android-arm64'
,
'--target=
$target
'
,
]);
applicationBinaryPath
=
'
$testDirectory
/build/app/outputs/flutter-apk/app-profile.apk'
;
break
;
...
...
@@ -548,6 +553,7 @@ class StartupTest {
'ios'
,
'-v'
,
'--profile'
,
'--target=
$target
'
,
]);
applicationBinaryPath
=
_findIosAppInBuildDirectory
(
'
$testDirectory
/build/ios/iphoneos'
);
break
;
...
...
@@ -565,6 +571,7 @@ class StartupTest {
'--verbose'
,
'--profile'
,
'--trace-startup'
,
'--target=
$target
'
,
'-d'
,
device
.
deviceId
,
if
(
applicationBinaryPath
!=
null
)
...
...
dev/integration_tests/flutter_gallery/lib/delayed_main.dart
0 → 100644
View file @
22c1ca76
// Copyright 2014 The Flutter 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
'package:flutter/material.dart'
;
import
'gallery/app.dart'
;
Object
?
createGarbage
()
{
final
List
<
dynamic
>
garbage
=
<
dynamic
>[];
for
(
int
index
=
0
;
index
<
1000
;
index
+=
1
)
{
final
List
<
int
>
moreGarbage
=
List
<
int
>.
filled
(
1000
,
index
);
if
(
index
.
isOdd
)
{
garbage
.
add
(
moreGarbage
);
}
}
return
garbage
;
}
Future
<
void
>
main
()
async
{
// Create some garbage, and simulate some delays between that could be
// plugin or network call related.
final
List
<
dynamic
>
garbage
=
<
dynamic
>[];
for
(
int
index
=
0
;
index
<
20
;
index
+=
1
)
{
final
Object
?
moreGarbage
=
createGarbage
();
if
(
index
.
isOdd
)
{
garbage
.
add
(
moreGarbage
);
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
7
));
}
}
runApp
(
const
GalleryApp
());
}
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