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
26516817
Unverified
Commit
26516817
authored
Apr 27, 2020
by
Kaushik Iska
Committed by
GitHub
Apr 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[timeline] Sort timeline events before summarizing (#55763)
parent
3c37db05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
timeline.dart
packages/flutter_driver/lib/src/driver/timeline.dart
+15
-10
No files found.
packages/flutter_driver/lib/src/driver/timeline.dart
View file @
26516817
...
...
@@ -34,12 +34,8 @@ class TimelineEvent {
json
[
'ph'
]
as
String
,
json
[
'pid'
]
as
int
,
json
[
'tid'
]
as
int
,
json
[
'dur'
]
!=
null
?
Duration
(
microseconds:
json
[
'dur'
]
as
int
)
:
null
,
json
[
'tdur'
]
!=
null
?
Duration
(
microseconds:
json
[
'tdur'
]
as
int
)
:
null
,
json
[
'dur'
]
!=
null
?
Duration
(
microseconds:
json
[
'dur'
]
as
int
)
:
null
,
json
[
'tdur'
]
!=
null
?
Duration
(
microseconds:
json
[
'tdur'
]
as
int
)
:
null
,
json
[
'ts'
]
as
int
,
json
[
'tts'
]
as
int
,
json
[
'args'
]
as
Map
<
String
,
dynamic
>,
...
...
@@ -124,11 +120,20 @@ class TimelineEvent {
List
<
TimelineEvent
>
_parseEvents
(
Map
<
String
,
dynamic
>
json
)
{
final
List
<
dynamic
>
jsonEvents
=
json
[
'traceEvents'
]
as
List
<
dynamic
>;
if
(
jsonEvents
==
null
)
if
(
jsonEvents
==
null
)
{
return
null
;
}
// TODO(vegorov): use instance method version of castFrom when it is available.
return
Iterable
.
castFrom
<
dynamic
,
Map
<
String
,
dynamic
>>(
jsonEvents
)
.
map
<
TimelineEvent
>((
Map
<
String
,
dynamic
>
eventJson
)
=>
TimelineEvent
(
eventJson
))
.
toList
();
final
List
<
TimelineEvent
>
timelineEvents
=
Iterable
.
castFrom
<
dynamic
,
Map
<
String
,
dynamic
>>(
jsonEvents
)
.
map
<
TimelineEvent
>(
(
Map
<
String
,
dynamic
>
eventJson
)
=>
TimelineEvent
(
eventJson
))
.
toList
();
timelineEvents
.
sort
((
TimelineEvent
e1
,
TimelineEvent
e2
)
{
return
e1
.
timestampMicros
.
compareTo
(
e2
.
timestampMicros
);
});
return
timelineEvents
;
}
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