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
be7a4227
Unverified
Commit
be7a4227
authored
May 26, 2022
by
Dan Field
Committed by
GitHub
May 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a macrobenchmark for laying out text in a list (#104736)
parent
5cd979e4
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
167 additions
and
0 deletions
+167
-0
.ci.yaml
.ci.yaml
+22
-0
TESTOWNERS
TESTOWNERS
+2
-0
common.dart
dev/benchmarks/macrobenchmarks/lib/common.dart
+1
-0
main.dart
dev/benchmarks/macrobenchmarks/lib/main.dart
+9
-0
list_text_layout.dart
dev/benchmarks/macrobenchmarks/lib/src/list_text_layout.dart
+69
-0
list_text_layout_perf_e2e.dart
...marks/macrobenchmarks/test/list_text_layout_perf_e2e.dart
+16
-0
list_text_layout_perf_test.dart
...crobenchmarks/test_driver/list_text_layout_perf_test.dart
+16
-0
list_text_layout_impeller_perf__e2e_summary.dart
...in/tasks/list_text_layout_impeller_perf__e2e_summary.dart
+12
-0
list_text_layout_perf__e2e_summary.dart
...vicelab/bin/tasks/list_text_layout_perf__e2e_summary.dart
+12
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+8
-0
No files found.
.ci.yaml
View file @
be7a4227
...
...
@@ -1923,6 +1923,28 @@ targets:
task_name
:
multi_widget_construction_perf__e2e_summary
scheduler
:
luci
-
name
:
Linux_android list_text_layout_perf__e2e_summary
recipe
:
devicelab/devicelab_drone
presubmit
:
false
timeout
:
60
properties
:
tags
:
>
["devicelab", "android", "linux"]
task_name
:
list_text_layout_perf__e2e_summary
scheduler
:
luci
bringup
:
true
-
name
:
Linux_android list_text_layout_impeller_perf__e2e_summary
recipe
:
devicelab/devicelab_drone
presubmit
:
false
timeout
:
60
properties
:
tags
:
>
["devicelab", "android", "linux"]
task_name
:
list_text_layout_impeller_perf__e2e_summary
scheduler
:
luci
bringup
:
true
-
name
:
Linux_android new_gallery__crane_perf
recipe
:
devicelab/devicelab_drone
presubmit
:
false
...
...
TESTOWNERS
View file @
be7a4227
...
...
@@ -60,6 +60,8 @@
/dev/devicelab/bin/tasks/image_list_reported_duration.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/large_image_changer_perf_android.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/linux_chrome_dev_mode.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/list_text_layout_perf__e2e_summary.dart @dnfield @flutter/engine
/dev/devicelab/bin/tasks/list_text_layout_impeller_perf__e2e_summary.dart @dnfield @flutter/engine
/dev/devicelab/bin/tasks/multi_widget_construction_perf__e2e_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/new_gallery__crane_perf.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/picture_cache_perf__e2e_summary.dart @zanderso @flutter/engine
...
...
dev/benchmarks/macrobenchmarks/lib/common.dart
View file @
be7a4227
...
...
@@ -29,6 +29,7 @@ const String kAnimatedImageRouteName = '/animated_image';
const
String
kOpacityPeepholeRouteName
=
'/opacity_peephole'
;
const
String
kGradientPerfRouteName
=
'/gradient_perf'
;
const
String
kAnimatedComplexOpacityPerfRouteName
=
'/animated_complex_opacity'
;
const
String
kListTextLayoutRouteName
=
'/list_text_layout'
;
const
String
kOpacityPeepholeOneRectRouteName
=
'
$kOpacityPeepholeRouteName
/one_big_rect'
;
const
String
kOpacityPeepholeColumnOfOpacityRouteName
=
'
$kOpacityPeepholeRouteName
/column_of_opacity'
;
...
...
dev/benchmarks/macrobenchmarks/lib/main.dart
View file @
be7a4227
...
...
@@ -22,6 +22,7 @@ import 'src/gradient_perf.dart';
import
'src/heavy_grid_view.dart'
;
import
'src/large_image_changer.dart'
;
import
'src/large_images.dart'
;
import
'src/list_text_layout.dart'
;
import
'src/multi_widget_construction.dart'
;
import
'src/opacity_peephole.dart'
;
import
'src/picture_cache.dart'
;
...
...
@@ -76,6 +77,7 @@ class MacrobenchmarksApp extends StatelessWidget {
kGradientPerfRouteName:
(
BuildContext
context
)
=>
const
GradientPerfHomePage
(),
...
gradientPerfRoutes
,
kAnimatedComplexOpacityPerfRouteName:
(
BuildContext
context
)
=>
const
AnimatedComplexOpacity
(),
kListTextLayoutRouteName:
(
BuildContext
context
)
=>
const
ColumnOfText
(),
},
);
}
...
...
@@ -275,6 +277,13 @@ class HomePage extends StatelessWidget {
Navigator
.
pushNamed
(
context
,
kAnimatedComplexOpacityPerfRouteName
);
},
),
ElevatedButton
(
key:
const
Key
(
kListTextLayoutRouteName
),
child:
const
Text
(
'A list with lots of text'
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
kListTextLayoutRouteName
);
},
),
],
),
);
...
...
dev/benchmarks/macrobenchmarks/lib/src/list_text_layout.dart
0 → 100644
View file @
be7a4227
// 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'
;
class
ColumnOfText
extends
StatefulWidget
{
const
ColumnOfText
({
super
.
key
});
@override
State
<
ColumnOfText
>
createState
()
=>
ColumnOfTextState
();
}
class
ColumnOfTextState
extends
State
<
ColumnOfText
>
with
SingleTickerProviderStateMixin
{
bool
_showText
=
false
;
late
AnimationController
_controller
;
@override
void
initState
()
{
super
.
initState
();
_controller
=
AnimationController
(
vsync:
this
,
duration:
const
Duration
(
milliseconds:
300
),
)
..
addStatusListener
((
AnimationStatus
status
)
{
if
(
status
==
AnimationStatus
.
completed
)
{
setState
(()
{
_showText
=
!
_showText
;
});
_controller
..
reset
()
..
forward
();
}
})
..
forward
();
}
@override
void
dispose
()
{
_controller
.
dispose
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Material
(
child:
OverflowBox
(
alignment:
Alignment
.
topCenter
,
maxHeight:
double
.
infinity
,
child:
!
_showText
?
Container
()
:
Column
(
children:
List
<
Widget
>.
generate
(
9
,
(
int
index
)
{
return
ListTile
(
leading:
CircleAvatar
(
child:
Text
(
'G
$index
'
),
),
title:
Text
(
'Foo contact from
$index
-th local contact'
,
overflow:
TextOverflow
.
ellipsis
,
),
subtitle:
Text
(
'+91 88888 8800
$index
'
),
);
}),
),
),
);
}
}
dev/benchmarks/macrobenchmarks/test/list_text_layout_perf_e2e.dart
0 → 100644
View file @
be7a4227
// 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
(
'list_text_layout'
,
kListTextLayoutRouteName
,
pageDelay:
const
Duration
(
seconds:
1
),
duration:
const
Duration
(
seconds:
10
),
);
}
dev/benchmarks/macrobenchmarks/test_driver/list_text_layout_perf_test.dart
0 → 100644
View file @
be7a4227
// 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
(
)
{
macroPerfTest
(
'list_text_layout_perf'
,
kListTextLayoutRouteName
,
pageDelay:
const
Duration
(
seconds:
1
),
duration:
const
Duration
(
seconds:
10
),
);
}
dev/devicelab/bin/tasks/list_text_layout_impeller_perf__e2e_summary.dart
0 → 100644
View file @
be7a4227
// 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
(
createListTextLayoutPerfE2ETest
());
}
dev/devicelab/bin/tasks/list_text_layout_perf__e2e_summary.dart
0 → 100644
View file @
be7a4227
// 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
(
createListTextLayoutPerfE2ETest
(
enableImpeller:
true
));
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
be7a4227
...
...
@@ -418,6 +418,14 @@ TaskFunction createsMultiWidgetConstructPerfE2ETest() {
).
run
;
}
TaskFunction
createListTextLayoutPerfE2ETest
(
{
bool
enableImpeller
=
false
})
{
return
PerfTest
.
e2e
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test/list_text_layout_perf_e2e.dart'
,
enableImpeller:
enableImpeller
,
).
run
;
}
TaskFunction
createsScrollSmoothnessPerfTest
(
)
{
final
String
testDirectory
=
'
${flutterDirectory.path}
/dev/benchmarks/complex_layout'
;
...
...
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