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
41cc80c5
Unverified
Commit
41cc80c5
authored
Aug 08, 2019
by
Mehmet Fidanboylu
Committed by
GitHub
Aug 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose the timeline event names so they can be used in other systems that do tracing (#37863)
parent
f1ea4850
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
tracing.dart
packages/flutter_tools/lib/src/tracing.dart
+9
-9
No files found.
packages/flutter_tools/lib/src/tracing.dart
View file @
41cc80c5
...
...
@@ -12,15 +12,15 @@ import 'globals.dart';
import
'vmservice.dart'
;
// Names of some of the Timeline events we care about.
const
String
_
kFlutterEngineMainEnterEventName
=
'FlutterEngineMainEnter'
;
const
String
_
kFrameworkInitEventName
=
'Framework initialization'
;
const
String
_
kFirstFrameBuiltEventName
=
'Widgets built first useful frame'
;
const
String
_
kFirstFrameRasterizedEventName
=
'Rasterized first useful frame'
;
const
String
kFlutterEngineMainEnterEventName
=
'FlutterEngineMainEnter'
;
const
String
kFrameworkInitEventName
=
'Framework initialization'
;
const
String
kFirstFrameBuiltEventName
=
'Widgets built first useful frame'
;
const
String
kFirstFrameRasterizedEventName
=
'Rasterized first useful frame'
;
class
Tracing
{
Tracing
(
this
.
vmService
);
static
const
String
firstUsefulFrameEventName
=
_
kFirstFrameRasterizedEventName
;
static
const
String
firstUsefulFrameEventName
=
kFirstFrameRasterizedEventName
;
static
Future
<
Tracing
>
connect
(
Uri
uri
)
async
{
final
VMService
observatory
=
await
VMService
.
connect
(
uri
);
...
...
@@ -104,8 +104,8 @@ Future<void> downloadStartupTrace(VMService observatory, { bool awaitFirstFrame
String
message
=
'No useful metrics were gathered.'
;
final
int
engineEnterTimestampMicros
=
extractInstantEventTimestamp
(
_
kFlutterEngineMainEnterEventName
);
final
int
frameworkInitTimestampMicros
=
extractInstantEventTimestamp
(
_
kFrameworkInitEventName
);
final
int
engineEnterTimestampMicros
=
extractInstantEventTimestamp
(
kFlutterEngineMainEnterEventName
);
final
int
frameworkInitTimestampMicros
=
extractInstantEventTimestamp
(
kFrameworkInitEventName
);
if
(
engineEnterTimestampMicros
==
null
)
{
printTrace
(
'Engine start event is missing in the timeline:
$timeline
'
);
...
...
@@ -123,8 +123,8 @@ Future<void> downloadStartupTrace(VMService observatory, { bool awaitFirstFrame
}
if
(
awaitFirstFrame
)
{
final
int
firstFrameBuiltTimestampMicros
=
extractInstantEventTimestamp
(
_
kFirstFrameBuiltEventName
);
final
int
firstFrameRasterizedTimestampMicros
=
extractInstantEventTimestamp
(
_
kFirstFrameRasterizedEventName
);
final
int
firstFrameBuiltTimestampMicros
=
extractInstantEventTimestamp
(
kFirstFrameBuiltEventName
);
final
int
firstFrameRasterizedTimestampMicros
=
extractInstantEventTimestamp
(
kFirstFrameRasterizedEventName
);
if
(
firstFrameBuiltTimestampMicros
==
null
||
firstFrameRasterizedTimestampMicros
==
null
)
{
printTrace
(
'First frame events are missing in the timeline:
$timeline
'
);
throw
'First frame events are missing in the timeline. Cannot compute startup time.'
;
...
...
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