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
f0200f01
Unverified
Commit
f0200f01
authored
Jun 29, 2022
by
JsouLiang
Committed by
GitHub
Jun 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add benchmark case for RasterCache (#103338)
parent
4c1d887e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
188 additions
and
0 deletions
+188
-0
.ci.yaml
.ci.yaml
+11
-0
TESTOWNERS
TESTOWNERS
+1
-0
common.dart
dev/benchmarks/macrobenchmarks/lib/common.dart
+1
-0
main.dart
dev/benchmarks/macrobenchmarks/lib/main.dart
+9
-0
raster_cache_use_memory.dart
...arks/macrobenchmarks/lib/src/raster_cache_use_memory.dart
+129
-0
raster_cache_use_memory_perf_e2e.dart
...acrobenchmarks/test/raster_cache_use_memory_perf_e2e.dart
+16
-0
raster_cache_use_memory_perf__e2e_summary.dart
.../bin/tasks/raster_cache_use_memory_perf__e2e_summary.dart
+14
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+7
-0
No files found.
.ci.yaml
View file @
f0200f01
...
@@ -1396,6 +1396,17 @@ targets:
...
@@ -1396,6 +1396,17 @@ targets:
task_name
:
color_filter_cache_perf__e2e_summary
task_name
:
color_filter_cache_perf__e2e_summary
scheduler
:
luci
scheduler
:
luci
-
name
:
Linux_android raster_cache_use_memory_perf__e2e_summary
recipe
:
devicelab/devicelab_drone
presubmit
:
false
bringup
:
true
timeout
:
60
properties
:
tags
:
>
["devicelab","android","linux"]
task_name
:
raster_cache_use_memory_perf__e2e_summary
scheduler
:
luci
-
name
:
Linux_android shader_mask_cache_perf__e2e_summary
-
name
:
Linux_android shader_mask_cache_perf__e2e_summary
recipe
:
devicelab/devicelab_drone
recipe
:
devicelab/devicelab_drone
presubmit
:
false
presubmit
:
false
...
...
TESTOWNERS
View file @
f0200f01
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
/dev/devicelab/bin/tasks/platform_views_scroll_perf__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/platform_views_scroll_perf__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/plugin_dependencies_test.dart @jmagman @flutter/tool
/dev/devicelab/bin/tasks/plugin_dependencies_test.dart @jmagman @flutter/tool
/dev/devicelab/bin/tasks/routing_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/routing_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/raster_cache_use_memory_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/textfield_perf__e2e_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/textfield_perf__e2e_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/web_size__compile_test.dart @yjbanov @flutter/web
/dev/devicelab/bin/tasks/web_size__compile_test.dart @yjbanov @flutter/web
/dev/devicelab/bin/tasks/opacity_peephole_col_of_rows_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/opacity_peephole_col_of_rows_perf__e2e_summary.dart @flar @flutter/engine
...
...
dev/benchmarks/macrobenchmarks/lib/common.dart
View file @
f0200f01
...
@@ -21,6 +21,7 @@ const String kFadingChildAnimationRouteName = '/fading_child_animation';
...
@@ -21,6 +21,7 @@ const String kFadingChildAnimationRouteName = '/fading_child_animation';
const
String
kImageFilteredTransformAnimationRouteName
=
'/imagefiltered_transform_animation'
;
const
String
kImageFilteredTransformAnimationRouteName
=
'/imagefiltered_transform_animation'
;
const
String
kMultiWidgetConstructionRouteName
=
'/multi_widget_construction'
;
const
String
kMultiWidgetConstructionRouteName
=
'/multi_widget_construction'
;
const
String
kHeavyGridViewRouteName
=
'/heavy_gridview'
;
const
String
kHeavyGridViewRouteName
=
'/heavy_gridview'
;
const
String
kRasterCacheUseMemory
=
'/raster_cache_use_memory'
;
const
String
kShaderMaskCacheRouteName
=
'/shader_mask_cache'
;
const
String
kShaderMaskCacheRouteName
=
'/shader_mask_cache'
;
const
String
kSimpleScrollRouteName
=
'/simple_scroll'
;
const
String
kSimpleScrollRouteName
=
'/simple_scroll'
;
const
String
kStackSizeRouteName
=
'/stack_size'
;
const
String
kStackSizeRouteName
=
'/stack_size'
;
...
...
dev/benchmarks/macrobenchmarks/lib/main.dart
View file @
f0200f01
...
@@ -28,6 +28,7 @@ import 'src/opacity_peephole.dart';
...
@@ -28,6 +28,7 @@ import 'src/opacity_peephole.dart';
import
'src/picture_cache.dart'
;
import
'src/picture_cache.dart'
;
import
'src/picture_cache_complexity_scoring.dart'
;
import
'src/picture_cache_complexity_scoring.dart'
;
import
'src/post_backdrop_filter.dart'
;
import
'src/post_backdrop_filter.dart'
;
import
'src/raster_cache_use_memory.dart'
;
import
'src/shader_mask_cache.dart'
;
import
'src/shader_mask_cache.dart'
;
import
'src/simple_animation.dart'
;
import
'src/simple_animation.dart'
;
import
'src/simple_scroll.dart'
;
import
'src/simple_scroll.dart'
;
...
@@ -67,6 +68,7 @@ class MacrobenchmarksApp extends StatelessWidget {
...
@@ -67,6 +68,7 @@ class MacrobenchmarksApp extends StatelessWidget {
kImageFilteredTransformAnimationRouteName:
(
BuildContext
context
)
=>
const
FilteredChildAnimationPage
(
FilterType
.
rotateFilter
),
kImageFilteredTransformAnimationRouteName:
(
BuildContext
context
)
=>
const
FilteredChildAnimationPage
(
FilterType
.
rotateFilter
),
kMultiWidgetConstructionRouteName:
(
BuildContext
context
)
=>
const
MultiWidgetConstructTable
(
10
,
20
),
kMultiWidgetConstructionRouteName:
(
BuildContext
context
)
=>
const
MultiWidgetConstructTable
(
10
,
20
),
kHeavyGridViewRouteName:
(
BuildContext
context
)
=>
const
HeavyGridViewPage
(),
kHeavyGridViewRouteName:
(
BuildContext
context
)
=>
const
HeavyGridViewPage
(),
kRasterCacheUseMemory:
(
BuildContext
context
)
=>
const
RasterCacheUseMemory
(),
kShaderMaskCacheRouteName:
(
BuildContext
context
)
=>
const
ShaderMaskCachePage
(),
kShaderMaskCacheRouteName:
(
BuildContext
context
)
=>
const
ShaderMaskCachePage
(),
kSimpleScrollRouteName:
(
BuildContext
context
)
=>
const
SimpleScroll
(),
kSimpleScrollRouteName:
(
BuildContext
context
)
=>
const
SimpleScroll
(),
kStackSizeRouteName:
(
BuildContext
context
)
=>
const
StackSizePage
(),
kStackSizeRouteName:
(
BuildContext
context
)
=>
const
StackSizePage
(),
...
@@ -193,6 +195,13 @@ class HomePage extends StatelessWidget {
...
@@ -193,6 +195,13 @@ class HomePage extends StatelessWidget {
Navigator
.
pushNamed
(
context
,
kColorFilterCacheRouteName
);
Navigator
.
pushNamed
(
context
,
kColorFilterCacheRouteName
);
},
},
),
),
ElevatedButton
(
key:
const
Key
(
kRasterCacheUseMemory
),
child:
const
Text
(
'RasterCache Use Memory'
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
kRasterCacheUseMemory
);
},
),
ElevatedButton
(
ElevatedButton
(
key:
const
Key
(
kShaderMaskCacheRouteName
),
key:
const
Key
(
kShaderMaskCacheRouteName
),
child:
const
Text
(
'Shader Mask Cache'
),
child:
const
Text
(
'Shader Mask Cache'
),
...
...
dev/benchmarks/macrobenchmarks/lib/src/raster_cache_use_memory.dart
0 → 100644
View file @
f0200f01
// 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:ui'
;
import
'package:flutter/material.dart'
;
class
RasterCacheUseMemory
extends
StatefulWidget
{
const
RasterCacheUseMemory
({
super
.
key
});
@override
State
<
RasterCacheUseMemory
>
createState
()
=>
_RasterCacheUseMemoryState
();
}
class
_RasterCacheUseMemoryState
extends
State
<
RasterCacheUseMemory
>
with
TickerProviderStateMixin
{
final
ScrollController
_controller
=
ScrollController
();
@override
void
initState
()
{
super
.
initState
();
_controller
.
addListener
(()
{
if
(
_controller
.
offset
<
5
)
{
_controller
.
animateTo
(
20
,
duration:
const
Duration
(
milliseconds:
1000
),
curve:
Curves
.
ease
);
}
else
if
(
_controller
.
offset
>=
19
)
{
_controller
.
animateTo
(
0
,
duration:
const
Duration
(
milliseconds:
1000
),
curve:
Curves
.
ease
);
}
});
Timer
(
const
Duration
(
milliseconds:
1000
),
()
{
_controller
.
animateTo
(
150
,
duration:
const
Duration
(
milliseconds:
1000
),
curve:
Curves
.
ease
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
backgroundColor:
Colors
.
lightBlue
,
body:
ListView
(
controller:
_controller
,
children:
<
Widget
>[
RepaintBoundary
(
child:
ImageFiltered
(
imageFilter:
ImageFilter
.
blur
(
sigmaX:
4
,
sigmaY:
4
,
),
child:
RepaintBoundary
(
child:
Container
(
width:
50
,
height:
50
,
color:
Colors
.
red
,
),
),
),
),
ShaderMask
(
shaderCallback:
(
Rect
bounds
)
{
return
const
RadialGradient
(
center:
Alignment
.
topLeft
,
radius:
1.0
,
colors:
<
Color
>[
Colors
.
yellow
,
Colors
.
deepOrange
],
tileMode:
TileMode
.
mirror
,
).
createShader
(
bounds
);
},
blendMode:
BlendMode
.
srcATop
,
child:
Opacity
(
opacity:
0.5
,
child:
Column
(
children:
<
Widget
>[
ImageFiltered
(
imageFilter:
ImageFilter
.
blur
(
sigmaX:
4
,
sigmaY:
4
,
),
child:
Row
(
children:
<
Widget
>[
ImageFiltered
(
imageFilter:
ImageFilter
.
blur
(
sigmaX:
4
,
sigmaY:
4
,
),
child:
RepaintBoundary
(
child:
Container
(
margin:
const
EdgeInsets
.
fromLTRB
(
10
,
5
,
10
,
5
),
decoration:
BoxDecoration
(
color:
Colors
.
white70
,
boxShadow:
const
<
BoxShadow
>[
BoxShadow
(
blurRadius:
5.0
,
),
],
borderRadius:
BorderRadius
.
circular
(
5.0
),
),
child:
const
FlutterLogo
(
size:
50
,
),
),
),
)
],
),
)
],
),
),
),
const
RepaintBoundary
(
child:
FlutterLogo
(
size:
50
,
),
),
Container
(
height:
800
,
),
],
),
);
}
@override
void
dispose
()
{
_controller
.
dispose
();
super
.
dispose
();
}
}
dev/benchmarks/macrobenchmarks/test/raster_cache_use_memory_perf_e2e.dart
0 → 100644
View file @
f0200f01
// 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:macrobenchmarks/common.dart'
;
import
'util.dart'
;
void
main
(
)
{
macroPerfTestE2E
(
'raster_cache_use_memory_perf'
,
kRasterCacheUseMemory
,
pageDelay:
const
Duration
(
seconds:
1
),
duration:
const
Duration
(
seconds:
10
),
);
}
dev/devicelab/bin/tasks/raster_cache_use_memory_perf__e2e_summary.dart
0 → 100644
View file @
f0200f01
// 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
'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
(
createRasterCacheUseMemoryPerfE2ETest
());
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
f0200f01
...
@@ -384,6 +384,13 @@ TaskFunction createColorFilterCachePerfE2ETest() {
...
@@ -384,6 +384,13 @@ TaskFunction createColorFilterCachePerfE2ETest() {
).
run
;
).
run
;
}
}
TaskFunction
createRasterCacheUseMemoryPerfE2ETest
(
)
{
return
PerfTest
.
e2e
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test/raster_cache_use_memory_perf_e2e.dart'
,
).
run
;
}
TaskFunction
createShaderMaskCachePerfE2ETest
(
)
{
TaskFunction
createShaderMaskCachePerfE2ETest
(
)
{
return
PerfTest
.
e2e
(
return
PerfTest
.
e2e
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
...
...
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