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

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

Issue 1707173003: tools/android/loading Add 'redirect' and 'ping' content types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: indent Created 4 years, 10 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
« no previous file with comments | « no previous file | tools/android/loading/request_track.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 """Visualize a loading_model.ResourceGraph.""" 5 """Visualize a loading_model.ResourceGraph."""
6 6
7 import dag 7 import dag
8 import itertools 8 import itertools
9 9
10 import loading_model 10 import loading_model
(...skipping 19 matching lines...) Expand all
30 30
31 _CONTENT_TYPE_TO_COLOR = { 31 _CONTENT_TYPE_TO_COLOR = {
32 'html': 'red', 32 'html': 'red',
33 'css': 'green', 33 'css': 'green',
34 'script': 'blue', 34 'script': 'blue',
35 'javascript': 'blue', 35 'javascript': 'blue',
36 'json': 'purple', 36 'json': 'purple',
37 'gif': 'grey', 37 'gif': 'grey',
38 'image': 'orange', 38 'image': 'orange',
39 'jpeg': 'orange', 39 'jpeg': 'orange',
40 'ping': 'cyan', # Empty response
41 'redirect': 'forestgreen',
40 'png': 'orange', 42 'png': 'orange',
41 'plain': 'brown3', 43 'plain': 'brown3',
42 'octet-stream': 'brown3', 44 'octet-stream': 'brown3',
43 'other': 'white', 45 'other': 'white',
44 'synthetic': 'yellow', 46 'synthetic': 'yellow',
45 } 47 }
46 48
47 _EDGE_KIND_TO_COLOR = { 49 _EDGE_KIND_TO_COLOR = {
48 'redirect': 'black', 50 'redirect': 'black',
49 'parser': 'red', 51 'parser': 'red',
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 styles = ['filled'] 175 styles = ['filled']
174 if node.IsAd() or node.IsTracking(): 176 if node.IsAd() or node.IsTracking():
175 styles += ['bold', 'diagonals'] 177 styles += ['bold', 'diagonals']
176 return ('%d [label = "%s\\n%.2f->%.2f (%.2f)"; style = "%s"; ' 178 return ('%d [label = "%s\\n%.2f->%.2f (%.2f)"; style = "%s"; '
177 'fillcolor = %s; shape = %s];\n' 179 'fillcolor = %s; shape = %s];\n'
178 % (node.Index(), node.ShortName(), 180 % (node.Index(), node.ShortName(),
179 node.StartTime() - self._global_start, 181 node.StartTime() - self._global_start,
180 node.EndTime() - self._global_start, 182 node.EndTime() - self._global_start,
181 node.EndTime() - node.StartTime(), 183 node.EndTime() - node.StartTime(),
182 ','.join(styles), color, shape)) 184 ','.join(styles), color, shape))
OLDNEW
« no previous file with comments | « no previous file | tools/android/loading/request_track.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698