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
2b04e300
Commit
2b04e300
authored
May 04, 2017
by
Ian Hickson
Committed by
GitHub
May 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix microbenchmarks tests. (#9782)
parent
961da5a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
build_bench.dart
dev/benchmarks/microbenchmarks/lib/stocks/build_bench.dart
+5
-1
layout_bench.dart
dev/benchmarks/microbenchmarks/lib/stocks/layout_bench.dart
+5
-1
microbenchmarks.dart
dev/devicelab/lib/tasks/microbenchmarks.dart
+1
-2
No files found.
dev/benchmarks/microbenchmarks/lib/stocks/build_bench.dart
View file @
2b04e300
...
...
@@ -44,7 +44,11 @@ Future<Null> main() async {
// artificially high load to find out how much CPU each frame takes.
// This differs from normal benchmarks which might look at how many
// frames are missed, etc.
ui
.
window
.
onBeginFrame
(
new
Duration
(
milliseconds:
iterations
*
16
));
// We use Timer.run to ensure there's a microtask flush in between
// the two calls below.
Timer
.
run
(()
{
ui
.
window
.
onBeginFrame
(
new
Duration
(
milliseconds:
iterations
*
16
));
});
Timer
.
run
(()
{
ui
.
window
.
onDrawFrame
();
});
await
tester
.
idle
();
// wait until the frame has run
iterations
+=
1
;
}
watch
.
stop
();
...
...
dev/benchmarks/microbenchmarks/lib/stocks/layout_bench.dart
View file @
2b04e300
...
...
@@ -45,7 +45,11 @@ Future<Null> main() async {
// artificially high load to find out how much CPU each frame takes.
// This differs from normal benchmarks which might look at how many
// frames are missed, etc.
ui
.
window
.
onBeginFrame
(
new
Duration
(
milliseconds:
iterations
*
16
));
// We use Timer.run to ensure there's a microtask flush in between
// the two calls below.
Timer
.
run
(()
{
ui
.
window
.
onBeginFrame
(
new
Duration
(
milliseconds:
iterations
*
16
));
});
Timer
.
run
(()
{
ui
.
window
.
onDrawFrame
();
});
await
tester
.
idle
();
// wait until the frame has run
iterations
+=
1
;
}
watch
.
stop
();
...
...
dev/devicelab/lib/tasks/microbenchmarks.dart
View file @
2b04e300
...
...
@@ -29,9 +29,8 @@ TaskFunction createMicrobenchmarkTask() {
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/benchmarks/microbenchmarks'
));
final
Process
flutterProcess
=
await
inDirectory
(
appDir
,
()
async
{
if
(
deviceOperatingSystem
==
DeviceOperatingSystem
.
ios
)
{
if
(
deviceOperatingSystem
==
DeviceOperatingSystem
.
ios
)
await
prepareProvisioningCertificates
(
appDir
.
path
);
}
return
await
_startFlutter
(
options:
<
String
>[
'--profile'
,
...
...
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