Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: tools/android/loading/request_dependencies_lens.py

Issue 1619713002: Upgrade analyze.py and related scripts to new world order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/android/loading/processing.py ('k') | tools/android/loading/request_track.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/request_dependencies_lens.py
diff --git a/tools/android/loading/request_dependencies_lens.py b/tools/android/loading/request_dependencies_lens.py
index 9aacd81938685980abf0f809a2fe1d9b127f3441..81a029a142170b20366ba00ec2fb7780d6ee2381 100644
--- a/tools/android/loading/request_dependencies_lens.py
+++ b/tools/android/loading/request_dependencies_lens.py
@@ -126,7 +126,8 @@ class RequestDependencyLens(object):
"""
candidates = self._requests_by_url.get(url, [])
candidates = [r for r in candidates if (
- r.timestamp + max(0, r.timing.receive_headers_end) <= before_timestamp)]
+ r.timestamp + max(
+ 0, r.timing.receive_headers_end / 1000) <= before_timestamp)]
candidates.sort(key=operator.attrgetter('timestamp'))
return candidates
@@ -157,7 +158,8 @@ class RequestDependencyLens(object):
parent_frame_id = self._frame_to_parent[request.frame_id]
same_parent_matches = [
r for r in matches
- if self._frame_to_parent[r.frame_id] == parent_frame_id]
+ if r.frame_id in self._frame_to_parent and
+ self._frame_to_parent[r.frame_id] == parent_frame_id]
if not same_parent_matches:
logging.warning('All matches are from non-sibling frames.')
return matches[-1]
« no previous file with comments | « tools/android/loading/processing.py ('k') | tools/android/loading/request_track.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698