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
a091206e
Unverified
Commit
a091206e
authored
Apr 23, 2020
by
liyuqian
Committed by
GitHub
Apr 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add performance tests for the new gallery (#55181)
parent
8d6187fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
0 deletions
+74
-0
new_gallery__transition_perf.dart
dev/devicelab/bin/tasks/new_gallery__transition_perf.dart
+25
-0
utils.dart
dev/devicelab/lib/framework/utils.dart
+16
-0
new_gallery.dart
dev/devicelab/lib/tasks/new_gallery.dart
+27
-0
manifest.yaml
dev/devicelab/manifest.yaml
+6
-0
No files found.
dev/devicelab/bin/tasks/new_gallery__transition_perf.dart
0 → 100644
View file @
a091206e
// 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
).
run
);
}
finally
{
rmTree
(
galleryParentDir
);
}
}
dev/devicelab/lib/framework/utils.dart
View file @
a091206e
...
...
@@ -501,6 +501,22 @@ String jsonEncode(dynamic data) {
return
const
JsonEncoder
.
withIndent
(
' '
).
convert
(
data
)
+
'
\n
'
;
}
Future
<
void
>
getNewGallery
(
String
revision
,
Directory
galleryDir
)
async
{
section
(
'Get New Flutter Gallery!'
);
if
(
exists
(
galleryDir
))
{
galleryDir
.
deleteSync
(
recursive:
true
);
}
await
inDirectory
<
void
>(
galleryDir
.
parent
,
()
async
{
await
exec
(
'git'
,
<
String
>[
'clone'
,
'https://github.com/flutter/gallery.git'
]);
});
await
inDirectory
<
void
>(
galleryDir
,
()
async
{
await
exec
(
'git'
,
<
String
>[
'checkout'
,
revision
]);
});
}
void
checkNotNull
(
Object
o1
,
[
Object
o2
=
1
,
Object
o3
=
1
,
...
...
dev/devicelab/lib/tasks/new_gallery.dart
0 → 100644
View file @
a091206e
// 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/tasks/perf_tests.dart'
;
import
'../framework/framework.dart'
;
import
'../framework/utils.dart'
;
class
NewGalleryPerfTest
extends
PerfTest
{
NewGalleryPerfTest
(
this
.
galleryDir
)
:
super
(
galleryDir
.
path
,
'test_driver/transitions_perf.dart'
,
'transitions'
);
@override
Future
<
TaskResult
>
run
()
async
{
// 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
// roller to update this version.
await
getNewGallery
(
'59489e5571ddf554fc62ef52e9b16f1fed291026'
,
galleryDir
);
return
await
super
.
run
();
}
final
Directory
galleryDir
;
}
dev/devicelab/manifest.yaml
View file @
a091206e
...
...
@@ -749,6 +749,12 @@ tasks:
stage
:
devicelab
required_agent_capabilities
:
[
"
linux/android"
]
new_gallery__transition_perf
:
description
:
>
Measures the performance of screen transitions in the new Flutter Gallery on Android.
stage
:
devicelab
required_agent_capabilities
:
[
"
mac/android"
]
fast_scroll_large_images__memory
:
description
:
>
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