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
92bfc991
Unverified
Commit
92bfc991
authored
Jun 04, 2019
by
Kaushik Iska
Committed by
GitHub
Jun 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a benchmark for ImageCache (#33814)
* Add an image cache benchmark for a monochrome image
parent
e0cb4688
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
97 additions
and
9 deletions
+97
-9
pubspec.yaml
dev/benchmarks/complex_layout/pubspec.yaml
+2
-2
pubspec.yaml
dev/benchmarks/macrobenchmarks/pubspec.yaml
+2
-2
flutter_gallery__image_cache_memory.dart
...icelab/bin/tasks/flutter_gallery__image_cache_memory.dart
+17
-0
manifest.yaml
dev/devicelab/manifest.yaml
+7
-0
pubspec.yaml
examples/flutter_gallery/pubspec.yaml
+3
-2
image_cache_memory.dart
examples/flutter_gallery/test_memory/image_cache_memory.dart
+63
-0
update_packages.dart
packages/flutter_tools/lib/src/commands/update_packages.dart
+1
-1
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+2
-2
No files found.
dev/benchmarks/complex_layout/pubspec.yaml
View file @
92bfc991
...
@@ -15,7 +15,7 @@ dependencies:
...
@@ -15,7 +15,7 @@ dependencies:
# //packages/flutter_tools/lib/src/commands/update_packages.dart
# //packages/flutter_tools/lib/src/commands/update_packages.dart
# and run
# and run
# flutter update-packages --force-upgrade
# flutter update-packages --force-upgrade
flutter_gallery_assets
:
0.1.
8
flutter_gallery_assets
:
0.1.
9+2
async
:
2.2.0
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async
:
2.2.0
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
charcode
:
1.1.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
charcode
:
1.1.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...
@@ -82,4 +82,4 @@ flutter:
...
@@ -82,4 +82,4 @@ flutter:
-
packages/flutter_gallery_assets/people/square/ali.png
-
packages/flutter_gallery_assets/people/square/ali.png
-
packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
-
packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png
# PUBSPEC CHECKSUM:
f69a
# PUBSPEC CHECKSUM:
e4f8
dev/benchmarks/macrobenchmarks/pubspec.yaml
View file @
92bfc991
...
@@ -15,7 +15,7 @@ dependencies:
...
@@ -15,7 +15,7 @@ dependencies:
# //packages/flutter_tools/lib/src/commands/update_packages.dart
# //packages/flutter_tools/lib/src/commands/update_packages.dart
# and run
# and run
# flutter update-packages --force-upgrade
# flutter update-packages --force-upgrade
flutter_gallery_assets
:
0.1.
8
flutter_gallery_assets
:
0.1.
9+2
async
:
2.2.0
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
async
:
2.2.0
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
charcode
:
1.1.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
charcode
:
1.1.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...
@@ -79,4 +79,4 @@ dev_dependencies:
...
@@ -79,4 +79,4 @@ dev_dependencies:
flutter
:
flutter
:
uses-material-design
:
true
uses-material-design
:
true
# PUBSPEC CHECKSUM:
f69a
# PUBSPEC CHECKSUM:
e4f8
dev/devicelab/bin/tasks/flutter_gallery__image_cache_memory.dart
0 → 100644
View file @
92bfc991
// 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/framework.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
void
>
main
()
async
{
await
task
(
MemoryTest
(
'
${flutterDirectory.path}
/examples/flutter_gallery'
,
'test_memory/image_cache_memory.dart'
,
'io.flutter.demo.gallery'
,
).
run
);
}
dev/devicelab/manifest.yaml
View file @
92bfc991
...
@@ -527,6 +527,13 @@ tasks:
...
@@ -527,6 +527,13 @@ tasks:
stage
:
devicelab
stage
:
devicelab
required_agent_capabilities
:
[
"
linux/android"
]
required_agent_capabilities
:
[
"
linux/android"
]
flutter_gallery__image_cache_memory
:
description
:
>
Measures memory usage for a list of large red squares in smaller containers.
stage
:
devicelab
required_agent_capabilities
:
[
"
linux/android"
]
flaky
:
true
analyzer_benchmark
:
analyzer_benchmark
:
description
:
>
description
:
>
Measures the speed of Dart analyzer.
Measures the speed of Dart analyzer.
...
...
examples/flutter_gallery/pubspec.yaml
View file @
92bfc991
...
@@ -19,7 +19,7 @@ dependencies:
...
@@ -19,7 +19,7 @@ dependencies:
shrine_images
:
1.1.2
shrine_images
:
1.1.2
# Also update dev/benchmarks/complex_layout/pubspec.yaml
# Also update dev/benchmarks/complex_layout/pubspec.yaml
flutter_gallery_assets
:
0.1.
8
flutter_gallery_assets
:
0.1.
9+2
charcode
:
1.1.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
charcode
:
1.1.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
meta
:
1.1.6
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
meta
:
1.1.6
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...
@@ -88,6 +88,7 @@ flutter:
...
@@ -88,6 +88,7 @@ flutter:
assets
:
assets
:
-
lib/gallery/example_code.dart
-
lib/gallery/example_code.dart
-
packages/flutter_gallery_assets/people/ali_landscape.png
-
packages/flutter_gallery_assets/people/ali_landscape.png
-
packages/flutter_gallery_assets/monochrome/red-square-1024x1024.png
-
packages/flutter_gallery_assets/logos/flutter_white/logo.png
-
packages/flutter_gallery_assets/logos/flutter_white/logo.png
-
packages/flutter_gallery_assets/logos/fortnightly/fortnightly_logo.png
-
packages/flutter_gallery_assets/logos/fortnightly/fortnightly_logo.png
-
packages/flutter_gallery_assets/videos/bee.mp4
-
packages/flutter_gallery_assets/videos/bee.mp4
...
@@ -253,4 +254,4 @@ flutter:
...
@@ -253,4 +254,4 @@ flutter:
-
asset
:
packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf
-
asset
:
packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf
-
asset
:
packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf
-
asset
:
packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf
# PUBSPEC CHECKSUM:
7863
# PUBSPEC CHECKSUM:
35c1
examples/flutter_gallery/test_memory/image_cache_memory.dart
0 → 100644
View file @
92bfc991
// 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.
// See //dev/devicelab/bin/tasks/flutter_gallery__image_cache_memory.dart
import
'dart:async'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/scheduler.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
// Once we provide an option for images to be resized to
// fit the container, we should see a significant drop in
// the amount of memory consumed by this benchmark.
Future
<
void
>
main
()
async
{
const
int
numItems
=
10
;
runApp
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
ListView
.
builder
(
key:
const
Key
(
'ImageList'
),
itemCount:
numItems
,
itemBuilder:
(
BuildContext
context
,
int
position
)
{
return
Container
(
width:
200
,
height:
200
,
child:
Center
(
child:
Image
.
asset
(
'monochrome/red-square-1024x1024.png'
,
package:
'flutter_gallery_assets'
,
width:
100
,
height:
100
,
fit:
BoxFit
.
contain
,
key:
Key
(
'image_
$position
'
),
),
),
);
},
),
));
await
SchedulerBinding
.
instance
.
endOfFrame
;
// We are waiting for the GPU to rasterize a frame here. This makes this flaky,
// we can rely on a more deterministic such as `Window.onReportTimings` once
// https://github.com/flutter/flutter/issues/26154 is addressed.
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
50
));
debugPrint
(
'==== MEMORY BENCHMARK ==== READY ===='
);
final
WidgetController
controller
=
LiveWidgetController
(
WidgetsBinding
.
instance
);
debugPrint
(
'Scrolling...'
);
final
Finder
list
=
find
.
byKey
(
const
Key
(
'ImageList'
));
final
Finder
lastItem
=
find
.
byKey
(
const
Key
(
'image_
${numItems - 1}
'
));
do
{
await
controller
.
drag
(
list
,
const
Offset
(
0.0
,
-
30.0
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
20
));
}
while
(!
lastItem
.
precache
());
debugPrint
(
'==== MEMORY BENCHMARK ==== DONE ===='
);
}
packages/flutter_tools/lib/src/commands/update_packages.dart
View file @
92bfc991
...
@@ -21,7 +21,7 @@ import '../runner/flutter_command.dart';
...
@@ -21,7 +21,7 @@ import '../runner/flutter_command.dart';
/// package version in cases when upgrading to the latest breaks Flutter.
/// package version in cases when upgrading to the latest breaks Flutter.
const
Map
<
String
,
String
>
_kManuallyPinnedDependencies
=
<
String
,
String
>{
const
Map
<
String
,
String
>
_kManuallyPinnedDependencies
=
<
String
,
String
>{
// Add pinned packages here.
// Add pinned packages here.
'flutter_gallery_assets'
:
'0.1.
8
'
,
// See //examples/flutter_gallery/pubspec.yaml
'flutter_gallery_assets'
:
'0.1.
9+2
'
,
// See //examples/flutter_gallery/pubspec.yaml
'build_daemon'
:
'0.6.1'
,
// Crashes at 1.0
'build_daemon'
:
'0.6.1'
,
// Crashes at 1.0
'test'
:
'1.6.3'
,
// | Tests are timing out at 1.6.4 https://github.com/flutter/flutter/issues/33823
'test'
:
'1.6.3'
,
// | Tests are timing out at 1.6.4 https://github.com/flutter/flutter/issues/33823
'test_api'
:
'0.2.5'
,
// |
'test_api'
:
'0.2.5'
,
// |
...
...
packages/flutter_tools/pubspec.yaml
View file @
92bfc991
...
@@ -19,7 +19,7 @@ dependencies:
...
@@ -19,7 +19,7 @@ dependencies:
http
:
0.12.0+2
http
:
0.12.0+2
intl
:
0.15.8
intl
:
0.15.8
json_rpc_2
:
2.1.0
json_rpc_2
:
2.1.0
linter
:
0.1.9
0
linter
:
0.1.9
1
meta
:
1.1.6
meta
:
1.1.6
multicast_dns
:
0.1.1
multicast_dns
:
0.1.1
mustache
:
1.1.1
mustache
:
1.1.1
...
@@ -119,4 +119,4 @@ dartdoc:
...
@@ -119,4 +119,4 @@ dartdoc:
# Exclude this package from the hosted API docs.
# Exclude this package from the hosted API docs.
nodoc
:
true
nodoc
:
true
# PUBSPEC CHECKSUM:
ef94
# PUBSPEC CHECKSUM:
bf95
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