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

Side by Side Diff: tools/android/loading/queuing_lens.py

Issue 2047463002: Set tracing categories explicitly in Clovis and Sandwich (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Lens for resource load queuing. 5 """Lens for resource load queuing.
6 6
7 When executed as a script, takes a loading trace and prints queuing information 7 When executed as a script, takes a loading trace and prints queuing information
8 for each request. 8 for each request.
9 """ 9 """
10 10
11 import collections 11 import collections
12 import itertools 12 import itertools
13 import logging 13 import logging
14 14
15 import tracing 15 import clovis_constants
16 16
17 17
18 class QueuingLens(object): 18 class QueuingLens(object):
19 """Attaches queuing related trace events to request objects.""" 19 """Attaches queuing related trace events to request objects."""
20 QUEUING_CATEGORY = tracing.QUEUING_CATEGORY 20 QUEUING_CATEGORY = clovis_constants.QUEUING_CATEGORY
blundell 2016/06/06 16:06:38 nit: maybe this should still be defined in tracing
gabadie 2016/06/06 16:17:30 Curious: why would only this category be defined i
pasko 2016/06/06 17:30:52 I am concerned with clovis_constants.py and tracin
gabadie 2016/06/06 17:37:10 To me it just looks fine as is.
21 ASYNC_NAME = 'ScheduledResourceRequest' 21 ASYNC_NAME = 'ScheduledResourceRequest'
22 READY_NAME = 'ScheduledResourceRequest.Ready' 22 READY_NAME = 'ScheduledResourceRequest.Ready'
23 SET_PRIORITY_NAME = 'ScheduledResourceRequest.SetPriority' 23 SET_PRIORITY_NAME = 'ScheduledResourceRequest.SetPriority'
24 QUEUING_NAMES = set([ASYNC_NAME, 24 QUEUING_NAMES = set([ASYNC_NAME,
25 READY_NAME, 25 READY_NAME,
26 SET_PRIORITY_NAME]) 26 SET_PRIORITY_NAME])
27 27
28 IN_FLIGHT_NAME = 'ResourceScheduler::Client.InFlightRequests' 28 IN_FLIGHT_NAME = 'ResourceScheduler::Client.InFlightRequests'
29 SHOULD_START_NAME = 'ResourceScheduler::Client::ShouldStartRequestInfo' 29 SHOULD_START_NAME = 'ResourceScheduler::Client::ShouldStartRequestInfo'
30 30
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 fp=rq.fingerprint, 152 fp=rq.fingerprint,
153 ts=mkmsec(info.start_msec), te=mkmsec(info.end_msec), 153 ts=mkmsec(info.start_msec), te=mkmsec(info.end_msec),
154 rs=mkmsec(rq.start_msec), re=mkmsec(rq.end_msec), 154 rs=mkmsec(rq.start_msec), re=mkmsec(rq.end_msec),
155 ids=info.source_ids, url=rq.url) 155 ids=info.source_ids, url=rq.url)
156 for blocking_request in info.blocking: 156 for blocking_request in info.blocking:
157 print ' {} {}'.format(blocking_request.fingerprint, blocking_request.url) 157 print ' {} {}'.format(blocking_request.fingerprint, blocking_request.url)
158 158
159 if __name__ == '__main__': 159 if __name__ == '__main__':
160 import sys 160 import sys
161 _Main(sys.argv[1]) 161 _Main(sys.argv[1])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698