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
7596a3da
Unverified
Commit
7596a3da
authored
Mar 05, 2022
by
Jenn Magder
Committed by
GitHub
Mar 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logging when first frame is not rendering (#99566)
parent
f1d88586
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
tracing.dart
packages/flutter_tools/lib/src/tracing.dart
+18
-3
tracing_test.dart
packages/flutter_tools/test/general.shard/tracing_test.dart
+2
-1
No files found.
packages/flutter_tools/lib/src/tracing.dart
View file @
7596a3da
...
...
@@ -11,6 +11,7 @@ import 'base/error_handling_io.dart';
import
'base/file_system.dart'
;
import
'base/logger.dart'
;
import
'base/utils.dart'
;
import
'convert.dart'
;
import
'vmservice.dart'
;
// Names of some of the Timeline events we care about.
...
...
@@ -72,11 +73,25 @@ class Tracing {
}
}
if
(!
done
)
{
final
Timer
timer
=
Timer
(
const
Duration
(
seconds:
10
),
()
{
final
Timer
timer
=
Timer
(
const
Duration
(
seconds:
10
),
()
async
{
_logger
.
printStatus
(
'First frame is taking longer than expected...'
);
_logger
.
printTrace
(
'Views:'
);
for
(
final
FlutterView
view
in
views
)
{
_logger
.
printTrace
(
'id:
${view.id}
isolate:
${view.uiIsolate?.id}
'
);
final
String
?
isolateId
=
view
.
uiIsolate
?.
id
;
_logger
.
printTrace
(
'View ID:
${view.id}
'
);
if
(
isolateId
==
null
)
{
_logger
.
printTrace
(
'No isolate ID associated with the view.'
);
continue
;
}
final
vm_service
.
Isolate
?
isolate
=
await
vmService
.
getIsolateOrNull
(
isolateId
);
if
(
isolate
==
null
)
{
_logger
.
printTrace
(
'Isolate
$isolateId
not found.'
);
continue
;
}
_logger
.
printTrace
(
'Isolate
$isolateId
state:'
);
final
Map
<
String
,
Object
?>
isolateState
=
isolate
.
toJson
();
// "libraries" has very long output and is likely unrelated to any first-frame issues.
isolateState
.
remove
(
'libraries'
);
_logger
.
printTrace
(
jsonEncode
(
isolateState
));
}
_logger
.
printTrace
(
'Received VM events:'
);
_logger
.
printTrace
(
bufferedEvents
.
toString
());
...
...
packages/flutter_tools/test/general.shard/tracing_test.dart
View file @
7596a3da
...
...
@@ -232,7 +232,8 @@ void main() {
return
completer
.
future
;
});
expect
(
logger
.
statusText
,
contains
(
'First frame is taking longer than expected'
));
expect
(
logger
.
traceText
,
contains
(
'id: 1 isolate: null'
));
expect
(
logger
.
traceText
,
contains
(
'View ID: 1'
));
expect
(
logger
.
traceText
,
contains
(
'No isolate ID associated with the view'
));
expect
(
logger
.
traceText
,
contains
(
'Flutter.Error: [ExtensionData {test: data, renderedErrorText: error text}]'
));
});
...
...
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