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
cbe72db1
Unverified
Commit
cbe72db1
authored
Jan 12, 2021
by
LongCatIsLooong
Committed by
GitHub
Jan 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macrobenchmark: TextField with complex paragraph (#73374)
parent
4a52532e
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
180 additions
and
0 deletions
+180
-0
README.md
dev/benchmarks/macrobenchmarks/README.md
+1
-0
common.dart
dev/benchmarks/macrobenchmarks/lib/common.dart
+1
-0
main.dart
dev/benchmarks/macrobenchmarks/lib/main.dart
+9
-0
fullscreenTextField.dart
...nchmarks/macrobenchmarks/lib/src/fullscreenTextField.dart
+63
-0
fullscreen_textfield_perf_e2e.dart
...s/macrobenchmarks/test/fullscreen_textfield_perf_e2e.dart
+26
-0
fullscreen_textfield_perf_test.dart
...enchmarks/test_driver/fullscreen_textfield_perf_test.dart
+20
-0
fullscreen_textfield_perf.dart
dev/devicelab/bin/tasks/fullscreen_textfield_perf.dart
+12
-0
fullscreen_textfield_perf__e2e_summary.dart
...lab/bin/tasks/fullscreen_textfield_perf__e2e_summary.dart
+14
-0
fullscreen_textfield_perf__timeline_summary.dart
...in/tasks/fullscreen_textfield_perf__timeline_summary.dart
+12
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+16
-0
manifest.yaml
dev/devicelab/manifest.yaml
+6
-0
No files found.
dev/benchmarks/macrobenchmarks/README.md
View file @
cbe72db1
...
...
@@ -55,6 +55,7 @@ The key `[test_name]` can be:
-
`post_backdrop_filter_perf`
-
`simple_animation_perf`
-
`textfield_perf`
-
`fullscreen_textfield_perf`
### E2E benchmarks
...
...
dev/benchmarks/macrobenchmarks/lib/common.dart
View file @
cbe72db1
...
...
@@ -11,6 +11,7 @@ const String kPictureCacheRouteName = '/picture_cache';
const
String
kLargeImageChangerRouteName
=
'/large_image_changer'
;
const
String
kLargeImagesRouteName
=
'/large_images'
;
const
String
kTextRouteName
=
'/text'
;
const
String
kFullscreenTextRouteName
=
'/fullscreen_text'
;
const
String
kAnimatedPlaceholderRouteName
=
'/animated_placeholder'
;
const
String
kColorFilterAndFadeRouteName
=
'/color_filter_and_fade'
;
const
String
kFadingChildAnimationRouteName
=
'/fading_child_animation'
;
...
...
dev/benchmarks/macrobenchmarks/lib/main.dart
View file @
cbe72db1
...
...
@@ -12,6 +12,7 @@ import 'src/color_filter_and_fade.dart';
import
'src/cubic_bezier.dart'
;
import
'src/cull_opacity.dart'
;
import
'src/filtered_child_animation.dart'
;
import
'src/fullscreenTextField.dart'
;
import
'src/heavy_grid_view.dart'
;
import
'src/large_image_changer.dart'
;
import
'src/large_images.dart'
;
...
...
@@ -45,6 +46,7 @@ class MacrobenchmarksApp extends StatelessWidget {
kLargeImageChangerRouteName:
(
BuildContext
context
)
=>
LargeImageChangerPage
(),
kLargeImagesRouteName:
(
BuildContext
context
)
=>
LargeImagesPage
(),
kTextRouteName:
(
BuildContext
context
)
=>
TextPage
(),
kFullscreenTextRouteName:
(
BuildContext
context
)
=>
TextFieldPage
(),
kAnimatedPlaceholderRouteName:
(
BuildContext
context
)
=>
AnimatedPlaceholderPage
(),
kColorFilterAndFadeRouteName:
(
BuildContext
context
)
=>
ColorFilterAndFadePage
(),
kFadingChildAnimationRouteName:
(
BuildContext
context
)
=>
const
FilteredChildAnimationPage
(
FilterType
.
opacity
),
...
...
@@ -123,6 +125,13 @@ class HomePage extends StatelessWidget {
Navigator
.
pushNamed
(
context
,
kTextRouteName
);
},
),
ElevatedButton
(
key:
const
Key
(
kFullscreenTextRouteName
),
child:
const
Text
(
'Fullscreen Text'
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
kFullscreenTextRouteName
);
},
),
ElevatedButton
(
key:
const
Key
(
kAnimatedPlaceholderRouteName
),
child:
const
Text
(
'Animated Placeholder'
),
...
...
dev/benchmarks/macrobenchmarks/lib/src/fullscreenTextField.dart
0 → 100644
View file @
cbe72db1
This diff is collapsed.
Click to expand it.
dev/benchmarks/macrobenchmarks/test/fullscreen_textfield_perf_e2e.dart
0 → 100644
View file @
cbe72db1
// 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/foundation.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:macrobenchmarks/common.dart'
;
import
'util.dart'
;
void
main
(
)
{
macroPerfTestE2E
(
'fullscreen_textfield_perf'
,
kFullscreenTextRouteName
,
// The driver version doesn't have this delay because the delay caused
// by the communication between the host and the test device is long enough
// for the driver test, but there isn't such delay in this host independent
// test.
pageDelay:
const
Duration
(
milliseconds:
50
),
body:
(
WidgetController
controller
)
async
{
final
Finder
textfield
=
find
.
byKey
(
const
ValueKey
<
String
>(
'fullscreen-textfield'
));
controller
.
tap
(
textfield
);
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
5000
));
},
);
}
dev/benchmarks/macrobenchmarks/test_driver/fullscreen_textfield_perf_test.dart
0 → 100644
View file @
cbe72db1
// 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_driver/flutter_driver.dart'
;
import
'package:macrobenchmarks/common.dart'
;
import
'util.dart'
;
void
main
(
)
{
macroPerfTest
(
'fullscreen_textfield_perf'
,
kFullscreenTextRouteName
,
driverOps:
(
FlutterDriver
driver
)
async
{
final
SerializableFinder
textfield
=
find
.
byValueKey
(
'fullscreen-textfield'
);
driver
.
tap
(
textfield
);
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
5000
));
},
);
}
dev/devicelab/bin/tasks/fullscreen_textfield_perf.dart
0 → 100644
View file @
cbe72db1
// 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/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFullscreenTextfieldPerfTest
());
}
dev/devicelab/bin/tasks/fullscreen_textfield_perf__e2e_summary.dart
0 → 100644
View file @
cbe72db1
// 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/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFullscreenTextfieldPerfE2ETest
());
}
dev/devicelab/bin/tasks/fullscreen_textfield_perf__timeline_summary.dart
0 → 100644
View file @
cbe72db1
// 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/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFullscreenTextfieldPerfTest
());
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
cbe72db1
...
...
@@ -281,6 +281,22 @@ TaskFunction createTextfieldPerfE2ETest() {
).
run
;
}
TaskFunction
createFullscreenTextfieldPerfTest
(
)
{
return
PerfTest
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test_driver/run_app.dart'
,
'fullscreen_textfield_perf'
,
testDriver:
'test_driver/fullscreen_textfield_perf_test.dart'
,
).
run
;
}
TaskFunction
createFullscreenTextfieldPerfE2ETest
(
)
{
return
PerfTest
.
e2e
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test/fullscreen_textfield_perf_e2e.dart'
,
).
run
;
}
TaskFunction
createColorFilterAndFadePerfTest
(
)
{
return
PerfTest
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
...
...
dev/devicelab/manifest.yaml
View file @
cbe72db1
...
...
@@ -157,6 +157,12 @@ tasks:
stage
:
devicelab
required_agent_capabilities
:
[
"
mac/android"
]
fullscreen_textfield_perf__timeline_summary
:
description
:
>
Measures the runtime performance of large textfields with complex paragraph on Android.
stage
:
devicelab
required_agent_capabilities
:
[
"
mac/android"
]
color_filter_and_fade_perf__timeline_summary
:
description
:
>
Measures the runtime performance of color filter with fade on Android.
...
...
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