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

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

Issue 1888343003: Clovis: contentful paint upgrades. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url-rename
Patch Set: rebase Created 4 years, 8 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/prefetch_view.py ('k') | tools/android/loading/test_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/request_track.py
diff --git a/tools/android/loading/request_track.py b/tools/android/loading/request_track.py
index b4e3a151c25894108c89fa8ecf9442519ac25752..8bd62da6a87fa3c7968154eb76c1316f24804030 100644
--- a/tools/android/loading/request_track.py
+++ b/tools/android/loading/request_track.py
@@ -12,6 +12,7 @@ import collections
import copy
import datetime
import email.utils
+import hashlib
import json
import logging
import re
@@ -213,6 +214,12 @@ class Request(object):
return None
return self.start_msec + self.timing.LargestOffset()
+ @property
+ def fingerprint(self):
+ h = hashlib.sha256()
+ h.update(self.url)
+ return h.hexdigest()[:10]
+
def _TimestampOffsetFromStartMs(self, timestamp):
assert self.timing.request_time != -1
request_time = self.timing.request_time
« no previous file with comments | « tools/android/loading/prefetch_view.py ('k') | tools/android/loading/test_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698