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
f0ffc856
Unverified
Commit
f0ffc856
authored
Aug 26, 2022
by
Jonah Williams
Committed by
GitHub
Aug 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bad scroller benchmark (#110362)
parent
114ebeac
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
838 additions
and
690 deletions
+838
-690
.ci.yaml
.ci.yaml
+20
-0
TESTOWNERS
TESTOWNERS
+2
-0
main.dart
dev/benchmarks/complex_layout/lib/main.dart
+2
-687
main_bad.dart
dev/benchmarks/complex_layout/lib/main_bad.dart
+12
-0
app.dart
dev/benchmarks/complex_layout/lib/src/app.dart
+698
-0
scroll_perf_bad.dart
...enchmarks/complex_layout/test_driver/scroll_perf_bad.dart
+11
-0
scroll_perf_bad_test.dart
...arks/complex_layout/test_driver/scroll_perf_bad_test.dart
+59
-0
scroll_perf.dart
dev/benchmarks/complex_layout/test_memory/scroll_perf.dart
+1
-1
complex_layout_scroll_perf_bad_impeller_ios__timeline_summary.dart
...ayout_scroll_perf_bad_impeller_ios__timeline_summary.dart
+12
-0
complex_layout_scroll_perf_bad_ios__timeline_summary.dart
...complex_layout_scroll_perf_bad_ios__timeline_summary.dart
+12
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+9
-2
No files found.
.ci.yaml
View file @
f0ffc856
...
...
@@ -3119,6 +3119,26 @@ targets:
["devicelab", "ios", "mac"]
task_name
:
complex_layout_scroll_perf_ios__timeline_summary
-
name
:
Mac_ios complex_layout_scroll_perf_bad_ios__timeline_summary
recipe
:
devicelab/devicelab_drone
presubmit
:
false
bringup
:
true
timeout
:
60
properties
:
tags
:
>
["devicelab", "ios", "mac"]
task_name
:
complex_layout_scroll_perf_ios__timeline_summary
-
name
:
Mac_ios complex_layout_scroll_perf_bad_impeller_ios__timeline_summary
recipe
:
devicelab/devicelab_drone
presubmit
:
false
bringup
:
true
timeout
:
60
properties
:
tags
:
>
["devicelab", "ios", "mac"]
task_name
:
complex_layout_scroll_perf_ios__timeline_summary
-
name
:
Mac_ios external_ui_integration_test_ios
bringup
:
true
# Flaky https://github.com/flutter/flutter/issues/106806
recipe
:
devicelab/devicelab_drone
...
...
TESTOWNERS
View file @
f0ffc856
...
...
@@ -150,6 +150,8 @@
/dev/devicelab/bin/tasks/complex_layout_ios__compile.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/complex_layout_ios__start_up.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/complex_layout_scroll_perf_ios__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/complex_layout_scroll_perf_bad_ios__timeline_summary.dart @jonahwilliams @flutter/engine
/dev/devicelab/bin/tasks/complex_layout_scroll_perf_bad_impeller_ios__timeline_summary.dart @jonahwilliams @flutter/engine
/dev/devicelab/bin/tasks/cubic_bezier_perf_ios_sksl_warmup__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/external_ui_integration_test_ios.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/flavors_test_ios.dart @jmagman @flutter/tool
...
...
dev/benchmarks/complex_layout/lib/main.dart
View file @
f0ffc856
This diff is collapsed.
Click to expand it.
dev/benchmarks/complex_layout/lib/main_bad.dart
0 → 100644
View file @
f0ffc856
// 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/widgets.dart'
;
import
'src/app.dart'
;
void
main
(
)
{
runApp
(
const
ComplexLayoutApp
(
badScroll:
true
)
);
}
dev/benchmarks/complex_layout/lib/src/app.dart
0 → 100644
View file @
f0ffc856
This diff is collapsed.
Click to expand it.
dev/benchmarks/complex_layout/test_driver/scroll_perf_bad.dart
0 → 100644
View file @
f0ffc856
// 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:complex_layout/main_bad.dart'
as
app
;
import
'package:flutter_driver/driver_extension.dart'
;
void
main
(
)
{
enableFlutterDriverExtension
();
app
.
main
();
}
dev/benchmarks/complex_layout/test_driver/scroll_perf_bad_test.dart
0 → 100644
View file @
f0ffc856
// 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_driver/flutter_driver.dart'
;
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
group
(
'scrolling performance test'
,
()
{
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
await
driver
.
waitUntilFirstFrameRasterized
();
});
tearDownAll
(()
async
{
if
(
driver
!=
null
)
{
driver
.
close
();
}
});
Future
<
void
>
testScrollPerf
(
String
listKey
,
String
summaryName
)
async
{
// The slight initial delay avoids starting the timing during a
// period of increased load on the device. Without this delay, the
// benchmark has greater noise.
// See: https://github.com/flutter/flutter/issues/19434
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
250
));
final
Timeline
timeline
=
await
driver
.
traceAction
(()
async
{
// Find the scrollable stock list
final
SerializableFinder
list
=
find
.
byValueKey
(
listKey
);
expect
(
list
,
isNotNull
);
// Scroll down
for
(
int
i
=
0
;
i
<
5
;
i
+=
1
)
{
await
driver
.
scroll
(
list
,
0.0
,
-
300.0
,
const
Duration
(
milliseconds:
300
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
500
));
}
// Scroll up
for
(
int
i
=
0
;
i
<
5
;
i
+=
1
)
{
await
driver
.
scroll
(
list
,
0.0
,
300.0
,
const
Duration
(
milliseconds:
300
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
500
));
}
});
final
TimelineSummary
summary
=
TimelineSummary
.
summarize
(
timeline
);
await
summary
.
writeTimelineToFile
(
summaryName
,
pretty:
true
);
}
test
(
'complex_layout_scroll_perf'
,
()
async
{
await
testScrollPerf
(
'complex-scroll'
,
'complex_layout_scroll_perf'
);
},
timeout:
Timeout
.
none
);
});
}
dev/benchmarks/complex_layout/test_memory/scroll_perf.dart
View file @
f0ffc856
...
...
@@ -4,7 +4,7 @@
import
'dart:async'
;
import
'package:complex_layout/
main
.dart'
;
import
'package:complex_layout/
src/app
.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/scheduler.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
dev/devicelab/bin/tasks/complex_layout_scroll_perf_bad_impeller_ios__timeline_summary.dart
0 → 100644
View file @
f0ffc856
// 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
.
ios
;
await
task
(
createComplexLayoutScrollPerfTest
(
badScroll:
true
,
enableImpeller:
true
));
}
dev/devicelab/bin/tasks/complex_layout_scroll_perf_bad_ios__timeline_summary.dart
0 → 100644
View file @
f0ffc856
// 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
.
ios
;
await
task
(
createComplexLayoutScrollPerfTest
(
badScroll:
true
));
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
f0ffc856
...
...
@@ -23,12 +23,19 @@ String _testOutputDirectory(String testDirectory) {
return
Platform
.
environment
[
'FLUTTER_TEST_OUTPUTS_DIR'
]
??
'
$testDirectory
/build'
;
}
TaskFunction
createComplexLayoutScrollPerfTest
(
{
bool
measureCpuGpu
=
true
})
{
TaskFunction
createComplexLayoutScrollPerfTest
(
{
bool
measureCpuGpu
=
true
,
bool
badScroll
=
false
,
bool
enableImpeller
=
false
,
})
{
return
PerfTest
(
'
${flutterDirectory.path}
/dev/benchmarks/complex_layout'
,
'test_driver/scroll_perf.dart'
,
badScroll
?
'test_driver/scroll_perf_bad.dart'
:
'test_driver/scroll_perf.dart'
,
'complex_layout_scroll_perf'
,
measureCpuGpu:
measureCpuGpu
,
enableImpeller:
enableImpeller
,
).
run
;
}
...
...
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