| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 from ast import literal_eval | 6 from ast import literal_eval |
| 7 import os | 7 import os |
| 8 | 8 |
| 9 | 9 |
| 10 _HERE = os.path.dirname(__file__) | 10 _HERE = os.path.dirname(__file__) |
| 11 _SRC_ROOT = os.path.join(_HERE, '..', '..', '..') | 11 _SRC_ROOT = os.path.join(_HERE, '..', '..', '..') |
| 12 _FROM_SRC = lambda p: os.path.abspath(os.path.join(_SRC_ROOT, p)) | 12 _FROM_SRC = lambda p: os.path.abspath(os.path.join(_SRC_ROOT, p)) |
| 13 | 13 |
| 14 | 14 |
| 15 from sys import path as sys_path | 15 from sys import path as sys_path |
| 16 sys_path.insert(0, os.path.join(_HERE, '..')) | 16 sys_path.insert(0, os.path.join(_HERE, '..')) |
| 17 import processor | 17 import processor |
| 18 | 18 |
| 19 | 19 |
| 20 # High priority code to compile. | 20 # High priority code to compile. |
| 21 _NEED_TO_COMPILE = map(_FROM_SRC, [ | 21 _NEED_TO_COMPILE = map(_FROM_SRC, [ |
| 22 'chrome/browser/resources', | 22 'chrome/browser/resources/bookmark_manager', |
| 23 'chrome/browser/ui/webui', | 23 'chrome/browser/resources/downloads', |
| 24 'chrome/browser/resources/extensions', |
| 25 'chrome/browser/resources/help', |
| 26 'chrome/browser/resources/history', |
| 27 'chrome/browser/resources/ntp4', |
| 28 'chrome/browser/resources/options', |
| 29 'chrome/browser/resources/print_preview', |
| 30 'chrome/browser/resources/uber', |
| 24 'ui/webui/resources/js', | 31 'ui/webui/resources/js', |
| 25 ]) | 32 ]) |
| 26 | 33 |
| 27 | 34 |
| 28 # Code that we'd eventually like to compile. | 35 # Code that we'd eventually like to compile. |
| 29 _WANT_TO_COMPILE = map(_FROM_SRC, [ | 36 _WANT_TO_COMPILE = map(_FROM_SRC, [ |
| 37 'chrome/browser/resources', |
| 38 'chrome/browser/ui/webui', |
| 30 'chrome/renderer/resources', | 39 'chrome/renderer/resources', |
| 31 'chrome/test/data', | 40 'chrome/test/data', |
| 32 'content/renderer/resources', | 41 'content/renderer/resources', |
| 33 'content/test/data', | 42 'content/test/data', |
| 34 'extensions/renderer', | 43 'extensions/renderer', |
| 35 'extensions/test/data', | 44 'extensions/test/data', |
| 36 'remoting', | 45 'remoting', |
| 37 'ui/file_manager', | 46 'ui/file_manager', |
| 38 'ui/keyboard', | 47 'ui/keyboard', |
| 39 ]) | 48 ]) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 119 |
| 111 want_lines = sum(map(num_lines, files)) | 120 want_lines = sum(map(num_lines, files)) |
| 112 print 'want: %d files, %d lines' % (len(files), want_lines) | 121 print 'want: %d files, %d lines' % (len(files), want_lines) |
| 113 | 122 |
| 114 want_done = float(compiled_lines) / want_lines * 100 | 123 want_done = float(compiled_lines) / want_lines * 100 |
| 115 print '%.2f%% done with the code we want to compile' % want_done | 124 print '%.2f%% done with the code we want to compile' % want_done |
| 116 | 125 |
| 117 | 126 |
| 118 if __name__ == '__main__': | 127 if __name__ == '__main__': |
| 119 main() | 128 main() |
| OLD | NEW |