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
Hide 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:
...
@@ -1474,6 +1474,17 @@ targets:
task_name
:
flutter_gallery__start_up
task_name
:
flutter_gallery__start_up
scheduler
:
luci
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
-
name
:
Linux_android flutter_gallery_android__compile
recipe
:
devicelab/devicelab_drone
recipe
:
devicelab/devicelab_drone
presubmit
:
false
presubmit
:
false
...
...
TESTOWNERS
View file @
22c1ca76
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
/dev/devicelab/bin/tasks/flutter_gallery__image_cache_memory.dart @zanderso @flutter/engine
/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__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.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_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_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__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() {
...
@@ -215,9 +215,10 @@ TaskFunction createPictureCachePerfE2ETest() {
).
run
;
).
run
;
}
}
TaskFunction
createFlutterGalleryStartupTest
(
)
{
TaskFunction
createFlutterGalleryStartupTest
(
{
String
target
=
'lib/main.dart'
}
)
{
return
StartupTest
(
return
StartupTest
(
'
${flutterDirectory.path}
/dev/integration_tests/flutter_gallery'
,
'
${flutterDirectory.path}
/dev/integration_tests/flutter_gallery'
,
target:
target
,
).
run
;
).
run
;
}
}
...
@@ -502,10 +503,11 @@ Map<String, dynamic> _average(List<Map<String, dynamic>> results, int iterations
...
@@ -502,10 +503,11 @@ Map<String, dynamic> _average(List<Map<String, dynamic>> results, int iterations
/// Measure application startup performance.
/// Measure application startup performance.
class
StartupTest
{
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
String
testDirectory
;
final
bool
reportMetrics
;
final
bool
reportMetrics
;
final
String
target
;
Future
<
TaskResult
>
run
()
async
{
Future
<
TaskResult
>
run
()
async
{
return
inDirectory
<
TaskResult
>(
testDirectory
,
()
async
{
return
inDirectory
<
TaskResult
>(
testDirectory
,
()
async
{
...
@@ -522,6 +524,7 @@ class StartupTest {
...
@@ -522,6 +524,7 @@ class StartupTest {
'-v'
,
'-v'
,
'--profile'
,
'--profile'
,
'--target-platform=android-arm,android-arm64'
,
'--target-platform=android-arm,android-arm64'
,
'--target=
$target
'
,
]);
]);
applicationBinaryPath
=
'
$testDirectory
/build/app/outputs/flutter-apk/app-profile.apk'
;
applicationBinaryPath
=
'
$testDirectory
/build/app/outputs/flutter-apk/app-profile.apk'
;
break
;
break
;
...
@@ -531,6 +534,7 @@ class StartupTest {
...
@@ -531,6 +534,7 @@ class StartupTest {
'-v'
,
'-v'
,
'--profile'
,
'--profile'
,
'--target-platform=android-arm'
,
'--target-platform=android-arm'
,
'--target=
$target
'
,
]);
]);
applicationBinaryPath
=
'
$testDirectory
/build/app/outputs/flutter-apk/app-profile.apk'
;
applicationBinaryPath
=
'
$testDirectory
/build/app/outputs/flutter-apk/app-profile.apk'
;
break
;
break
;
...
@@ -540,6 +544,7 @@ class StartupTest {
...
@@ -540,6 +544,7 @@ class StartupTest {
'-v'
,
'-v'
,
'--profile'
,
'--profile'
,
'--target-platform=android-arm64'
,
'--target-platform=android-arm64'
,
'--target=
$target
'
,
]);
]);
applicationBinaryPath
=
'
$testDirectory
/build/app/outputs/flutter-apk/app-profile.apk'
;
applicationBinaryPath
=
'
$testDirectory
/build/app/outputs/flutter-apk/app-profile.apk'
;
break
;
break
;
...
@@ -548,6 +553,7 @@ class StartupTest {
...
@@ -548,6 +553,7 @@ class StartupTest {
'ios'
,
'ios'
,
'-v'
,
'-v'
,
'--profile'
,
'--profile'
,
'--target=
$target
'
,
]);
]);
applicationBinaryPath
=
_findIosAppInBuildDirectory
(
'
$testDirectory
/build/ios/iphoneos'
);
applicationBinaryPath
=
_findIosAppInBuildDirectory
(
'
$testDirectory
/build/ios/iphoneos'
);
break
;
break
;
...
@@ -565,6 +571,7 @@ class StartupTest {
...
@@ -565,6 +571,7 @@ class StartupTest {
'--verbose'
,
'--verbose'
,
'--profile'
,
'--profile'
,
'--trace-startup'
,
'--trace-startup'
,
'--target=
$target
'
,
'-d'
,
'-d'
,
device
.
deviceId
,
device
.
deviceId
,
if
(
applicationBinaryPath
!=
null
)
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