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
1ffdfa81
Unverified
Commit
1ffdfa81
authored
Jul 28, 2020
by
Yuqian Li
Committed by
GitHub
Jul 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Crane test to the new Gallery app (#62162)
parent
98264a47
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
2 deletions
+56
-2
new_gallery__crane_perf.dart
dev/devicelab/bin/tasks/new_gallery__crane_perf.dart
+33
-0
new_gallery.dart
dev/devicelab/lib/tasks/new_gallery.dart
+11
-2
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+6
-0
manifest.yaml
dev/devicelab/manifest.yaml
+6
-0
No files found.
dev/devicelab/bin/tasks/new_gallery__crane_perf.dart
0 → 100644
View file @
1ffdfa81
// 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
'dart:async'
;
import
'dart:io'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/tasks/new_gallery.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:path/path.dart'
as
path
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
final
Directory
galleryParentDir
=
Directory
.
systemTemp
.
createTempSync
(
'new_gallery_test'
);
final
Directory
galleryDir
=
Directory
(
path
.
join
(
galleryParentDir
.
path
,
'gallery'
));
try
{
await
task
(
NewGalleryPerfTest
(
galleryDir
,
timelineFileName:
'transitions-crane'
,
dartDefine:
'onlyCrane=true'
,
).
run
,
);
}
finally
{
rmTree
(
galleryParentDir
);
}
}
dev/devicelab/lib/tasks/new_gallery.dart
View file @
1ffdfa81
...
@@ -12,14 +12,23 @@ import '../framework/framework.dart';
...
@@ -12,14 +12,23 @@ import '../framework/framework.dart';
import
'../framework/utils.dart'
;
import
'../framework/utils.dart'
;
class
NewGalleryPerfTest
extends
PerfTest
{
class
NewGalleryPerfTest
extends
PerfTest
{
NewGalleryPerfTest
(
this
.
galleryDir
)
:
super
(
galleryDir
.
path
,
'test_driver/transitions_perf.dart'
,
'transitions'
);
NewGalleryPerfTest
(
this
.
galleryDir
,
{
String
timelineFileName
=
'transitions'
,
String
dartDefine
=
''
,
})
:
super
(
galleryDir
.
path
,
'test_driver/transitions_perf.dart'
,
timelineFileName
,
dartDefine:
dartDefine
,
);
@override
@override
Future
<
TaskResult
>
run
()
async
{
Future
<
TaskResult
>
run
()
async
{
// Manually roll the new gallery version for now. If the new gallery repo
// Manually roll the new gallery version for now. If the new gallery repo
// turns out to be updated frequently in the future, we can set up an auto
// turns out to be updated frequently in the future, we can set up an auto
// roller to update this version.
// roller to update this version.
await
getNewGallery
(
'
d00362e6bdd0f9b30bba337c358b9e4a6e4ca950
'
,
galleryDir
);
await
getNewGallery
(
'
e6357bccc49ec542ca127ca4b26b2b87216d07d5
'
,
galleryDir
);
return
await
super
.
run
();
return
await
super
.
run
();
}
}
...
...
dev/devicelab/lib/tasks/perf_tests.dart
View file @
1ffdfa81
...
@@ -357,6 +357,7 @@ class PerfTest {
...
@@ -357,6 +357,7 @@ class PerfTest {
this
.
testDriver
,
this
.
testDriver
,
this
.
needsFullTimeline
=
true
,
this
.
needsFullTimeline
=
true
,
this
.
benchmarkScoreKeys
,
this
.
benchmarkScoreKeys
,
this
.
dartDefine
=
''
,
});
});
/// The directory where the app under test is defined.
/// The directory where the app under test is defined.
...
@@ -395,6 +396,9 @@ class PerfTest {
...
@@ -395,6 +396,9 @@ class PerfTest {
/// ```
/// ```
final
List
<
String
>
benchmarkScoreKeys
;
final
List
<
String
>
benchmarkScoreKeys
;
/// Additional flags for `--dart-define` to control the test
final
String
dartDefine
;
Future
<
TaskResult
>
run
()
{
Future
<
TaskResult
>
run
()
{
return
internalRun
();
return
internalRun
();
}
}
...
@@ -427,6 +431,8 @@ class PerfTest {
...
@@ -427,6 +431,8 @@ class PerfTest {
if
(
writeSkslFileName
!=
null
)
if
(
writeSkslFileName
!=
null
)
...<
String
>[
'--write-sksl-on-exit'
,
writeSkslFileName
],
...<
String
>[
'--write-sksl-on-exit'
,
writeSkslFileName
],
if
(
cacheSkSL
)
'--cache-sksl'
,
if
(
cacheSkSL
)
'--cache-sksl'
,
if
(
dartDefine
.
isNotEmpty
)
...<
String
>[
'--dart-define'
,
dartDefine
],
'-d'
,
'-d'
,
deviceId
,
deviceId
,
]);
]);
...
...
dev/devicelab/manifest.yaml
View file @
1ffdfa81
...
@@ -820,6 +820,12 @@ tasks:
...
@@ -820,6 +820,12 @@ tasks:
stage
:
devicelab
stage
:
devicelab
required_agent_capabilities
:
[
"
mac/ios"
]
required_agent_capabilities
:
[
"
mac/ios"
]
new_gallery__crane_perf
:
description
:
>
Measures the performance of the Crane page in the new Flutter Gallery on Android.
stage
:
devicelab
required_agent_capabilities
:
[
"
linux/android"
]
fast_scroll_large_images__memory
:
fast_scroll_large_images__memory
:
description
:
>
description
:
>
Measures memory usage for scrolling through a list of large images.
Measures memory usage for scrolling through a list of large images.
...
...
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