OLD | NEW |
1 #! /usr/bin/python | 1 #! /usr/bin/python |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Creates a Graphviz file visualizing the resource dependencies from a JSON | 6 """Creates a Graphviz file visualizing the resource dependencies from a JSON |
7 file dumped by log_requests.py. | 7 file dumped by log_requests.py. |
8 """ | 8 """ |
9 | 9 |
10 import collections | 10 import collections |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 def main(): | 180 def main(): |
181 filename = sys.argv[1] | 181 filename = sys.argv[1] |
182 requests = log_parser.ParseJsonFile(filename) | 182 requests = log_parser.ParseJsonFile(filename) |
183 requests = log_parser.FilterRequests(requests) | 183 requests = log_parser.FilterRequests(requests) |
184 (resources, deps) = _BuildResourceDependencyGraph(requests) | 184 (resources, deps) = _BuildResourceDependencyGraph(requests) |
185 _GraphvizFileFromDeps(resources, requests, deps, filename + '.dot') | 185 _GraphvizFileFromDeps(resources, requests, deps, filename + '.dot') |
186 | 186 |
187 | 187 |
188 if __name__ == '__main__': | 188 if __name__ == '__main__': |
189 main() | 189 main() |
OLD | NEW |