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

Side by Side Diff: tools/android/memdump/memreport.py

Issue 23811008: [android] Remove deprecated package constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved beta and stable packages to PACKAGE_INFO Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/constants.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import collections 7 import collections
8 import json 8 import json
9 import optparse 9 import optparse
10 import os 10 import os
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 def main(argv): 251 def main(argv):
252 parser = optparse.OptionParser(usage='Usage: %prog [options]', 252 parser = optparse.OptionParser(usage='Usage: %prog [options]',
253 description=__doc__) 253 description=__doc__)
254 parser.add_option('-m', 254 parser.add_option('-m',
255 '--manual-graph', 255 '--manual-graph',
256 action='store_true', 256 action='store_true',
257 help='Manually collect data and generate a graph.') 257 help='Manually collect data and generate a graph.')
258 parser.add_option('-p', 258 parser.add_option('-p',
259 '--package', 259 '--package',
260 default=constants.CHROME_PACKAGE, 260 default=constants.PACKAGE_INFO['chrome'].package,
261 help='Package name to collect.') 261 help='Package name to collect.')
262 parser.add_option('-i', 262 parser.add_option('-i',
263 '--interval', 263 '--interval',
264 default=5, 264 default=5,
265 type='int', 265 type='int',
266 help='Interval in seconds for manual collections.') 266 help='Interval in seconds for manual collections.')
267 options, args = parser.parse_args(argv) 267 options, args = parser.parse_args(argv)
268 if options.manual_graph: 268 if options.manual_graph:
269 return _RunManualGraph(options.package, options.interval) 269 return _RunManualGraph(options.package, options.interval)
270 _DumpCSV(_CollectMemoryStats(sys.stdin, [value for (key, value) in _ENTRIES])) 270 _DumpCSV(_CollectMemoryStats(sys.stdin, [value for (key, value) in _ENTRIES]))
271 271
272 272
273 if __name__ == '__main__': 273 if __name__ == '__main__':
274 main(sys.argv) 274 main(sys.argv)
OLDNEW
« no previous file with comments | « build/android/pylib/constants.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698