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
211615fc
Unverified
Commit
211615fc
authored
Jun 06, 2018
by
Florian Loitsch
Committed by
GitHub
Jun 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable engine calls doring layout_bench. (#18163)
parent
b135fb37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
layout_bench.dart
dev/benchmarks/microbenchmarks/lib/stocks/layout_bench.dart
+7
-2
No files found.
dev/benchmarks/microbenchmarks/lib/stocks/layout_bench.dart
View file @
211615fc
...
...
@@ -33,6 +33,11 @@ Future<Null> main() async {
await
tester
.
pump
();
// Start drawer animation
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
// Complete drawer animation
// Disable calls from the engine which would interfere with the benchmark.
ui
.
window
.
onBeginFrame
=
null
;
ui
.
window
.
onDrawFrame
=
null
;
final
TestViewConfiguration
big
=
new
TestViewConfiguration
(
size:
const
Size
(
360.0
,
640.0
));
final
TestViewConfiguration
small
=
new
TestViewConfiguration
(
size:
const
Size
(
355.0
,
635.0
));
final
RenderView
renderView
=
WidgetsBinding
.
instance
.
renderView
;
...
...
@@ -47,8 +52,8 @@ Future<Null> main() async {
// frames are missed, etc.
// We use Timer.run to ensure there's a microtask flush in between
// the two calls below.
Timer
.
run
(()
{
ui
.
window
.
on
BeginFrame
(
new
Duration
(
milliseconds:
iterations
*
16
));
});
Timer
.
run
(()
{
ui
.
window
.
on
DrawFrame
();
});
Timer
.
run
(()
{
binding
.
handle
BeginFrame
(
new
Duration
(
milliseconds:
iterations
*
16
));
});
Timer
.
run
(()
{
binding
.
handle
DrawFrame
();
});
await
tester
.
idle
();
// wait until the frame has run (also uses Timer.run)
iterations
+=
1
;
}
...
...
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