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
4b92c167
Unverified
Commit
4b92c167
authored
Apr 03, 2020
by
Yegor
Committed by
GitHub
Apr 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use "measured_frame" instead of "CrRendererMain" to detect process ID (#53969)
parent
5c69785b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
browser.dart
dev/devicelab/lib/framework/browser.dart
+19
-12
No files found.
dev/devicelab/lib/framework/browser.dart
View file @
4b92c167
...
...
@@ -281,11 +281,26 @@ class BlinkTraceSummary {
.
toList
()
..
sort
((
BlinkTraceEvent
a
,
BlinkTraceEvent
b
)
=>
a
.
ts
-
b
.
ts
);
// Use the pid from the first "measured_frame" event since the event is
// emitted by the script running on the process we're interested in.
//
// We previously tried using the "CrRendererMain" event. However, for
// reasons unknown, Chrome in the devicelab refuses to emit this event
// sometimes, causing to flakes.
final
BlinkTraceEvent
firstMeasuredFrameEvent
=
events
.
firstWhere
(
(
BlinkTraceEvent
event
)
=>
event
.
isBeginMeasuredFrame
,
orElse:
()
=>
null
,
);
if
(
firstMeasuredFrameEvent
==
null
)
{
// This happens in benchmarks that do not measure frames, such as some
// of the text layout benchmarks.
return
null
;
}
final
int
tabPid
=
firstMeasuredFrameEvent
.
pid
;
// Filter out data from unrelated processes
final
BlinkTraceEvent
processLabel
=
events
.
where
((
BlinkTraceEvent
event
)
=>
event
.
isCrRendererMain
)
.
single
;
final
int
tabPid
=
processLabel
.
pid
;
events
=
events
.
where
((
BlinkTraceEvent
element
)
=>
element
.
pid
==
tabPid
).
toList
();
// Extract frame data.
...
...
@@ -489,14 +504,6 @@ class BlinkTraceEvent {
/// This event is a duration event that has its `tdur` populated.
bool
get
isUpdateAllLifecyclePhases
=>
ph
==
'X'
&&
name
==
'WebViewImpl::updateAllLifecyclePhases'
;
/// A "CrRendererMain" event contains information about the browser's UI
/// thread.
///
/// This event's [pid] field identifies the process that performs web page
/// rendering. The [isBeginFrame] and [isUpdateAllLifecyclePhases] events
/// with the same [pid] as this event all belong to the same web page.
bool
get
isCrRendererMain
=>
name
==
'thread_name'
&&
args
[
'name'
]
==
'CrRendererMain'
;
/// Whether this is the beginning of a "measured_frame" event.
///
/// This event is a custom event emitted by our benchmark test harness.
...
...
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